]> git.ipfire.org Git - ipfire-2.x.git/commit
vpnmain.cgi: Fix for bug13029 - add base64 encoding to IPSec cgi page
authorAdolf Belka <adolf.belka@ipfire.org>
Fri, 5 Jul 2024 17:18:54 +0000 (19:18 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Sep 2024 14:21:53 +0000 (14:21 +0000)
commit9d8d74e8e7bf0dfc84754f71d8971598a8d6ddc5
tree2af65169f31e18224b267032a186105f9b9ab189
parentc110071fa994fa9902871c70a4037ce104640afd
vpnmain.cgi: Fix for bug13029 - add base64 encoding to IPSec cgi page

- This adds the base64 encoded PSK into the config file and when the ipsec.secrets file
   is created the PSK is base64 decoded to write it to the file. The ipsec.secrets file
   surrounds the PSK with single quotation marks so that character is not allowed to be
   used in the PSK but anything else can be.
- Tested out on my vm system and shown to be working. New PSK with various characters
   characters including commas was base64 encoded before putting into the config file
   and therefore was accepted by the code. If a single quotation mark was used in the
   PSK then the error message about invalid characters was shown.

Fixes: Bug13029
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/vpnmain.cgi [changed mode: 0644->0755]