Skip to content

Commit eb5c2b7

Browse files
committed
[fix] Add missing full_clean() to VPN server auto-cert creation
AbstractVpn._auto_create_cert() was saving the server certificate without calling full_clean(), bypassing Django model validation (PEM format, extension structure, field constraints). The client-side equivalent in AbstractVpnClient._auto_create_cert() correctly calls full_clean() before save(). This aligns the server-side path with the client-side pattern.
1 parent d60ec13 commit eb5c2b7

File tree

1 file changed

+1
-0
lines changed
  • openwisp_controller/config/base

1 file changed

+1
-0
lines changed

openwisp_controller/config/base/vpn.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ def _auto_create_cert(self):
431431
extensions=server_extensions,
432432
)
433433
cert = self._auto_create_cert_extra(cert)
434+
cert.full_clean()
434435
cert.save()
435436
return cert
436437

0 commit comments

Comments
 (0)