Commit 1c22a8d
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.
The client-side equivalent in AbstractVpnClient._auto_create_cert()
correctly calls full_clean() before save().
Also delete any stale certificate with the same common name and CA
before creating a new one, to avoid unique constraint violations
when the VPN backend is changed (e.g. from WireGuard back to OpenVPN).1 parent d60ec13 commit 1c22a8d
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
420 | 424 | | |
421 | 425 | | |
422 | 426 | | |
| |||
431 | 435 | | |
432 | 436 | | |
433 | 437 | | |
| 438 | + | |
434 | 439 | | |
435 | 440 | | |
436 | 441 | | |
| |||
0 commit comments