]> git.ipfire.org Git - ipfire-2.x.git/commit
vpnmain.cgi: Fix editing connections that are using a PSK
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 28 Apr 2025 09:45:51 +0000 (09:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Apr 2025 08:50:54 +0000 (08:50 +0000)
commitf9f02b4c244fea3025245348678bb08bbfbd48a8
treea52ab037851887e7795cf3a84058ed609182adf6
parent610ed2f195d1447f8f56b9796d916edf2800661f
vpnmain.cgi: Fix editing connections that are using a PSK

This patch takes care of properly decoding the PSK if it was already
stored base64-encoded. If the connection is edited, it always will be
stored base64-encoded upon save.

It would have been nice to not send the PSK back to the browser again
(although the security benefits would have been marginal), but that
would make the code even messier than it is.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Tested-by: Christian Hernmarck <linux@hernmarck.ch>
html/cgi-bin/vpnmain.cgi