]> git.ipfire.org Git - ipfire-2.x.git/commit
ovpnmain.cgi: Fix for bug #12883 - separate .p12 file corrupted
authorAdolf Belka <adolf.belka@ipfire.org>
Wed, 22 Jun 2022 20:22:36 +0000 (22:22 +0200)
committerPeter Müller <peter.mueller@ipfire.org>
Thu, 23 Jun 2022 13:24:03 +0000 (13:24 +0000)
commitf158e71e20867a072d1c1795bea874e68c58c93b
treeaaa0efd3d26a1e00a0cc1543e98fb92c949b5eca
parent49471f05d53c3df70c47e98d068edb745cf3a816
ovpnmain.cgi: Fix for bug #12883 - separate .p12 file corrupted

- Patch https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=2feacd989823aa1dbd5844c315a9abfd49060487
   from May 2021 put the variable containing the .p12 content into double quotes which
   causes the contents to be treated as text whereas the .p12 file is an application file.
- Most people must be downloading the zip package of .p12, ovpn.conf and ta.key files so
   the problem was not noticed till now and flagged up in the forum.
   https://community.ipfire.org/t/openvpn-p12-password-on-android-problem/8127
- The problem does not occur for the .p12 file in the zip file as the downloading of the
   zip file does not have the variable name in double quotes.
- Putting the zip file variable into double quotes caused the downloaded zip file to be
   corrupt and not able to be opened as an archive.
- Removing the double quotes from the .p12 variable name caused the separate .p12 file
   download to be able to be correctly opened.
- The same quoted variable name is used also for the cacert.pem, cert.pem, servercert.pem
   and ta.key file downloads. To be consistent the same change has been applied to these.

Fixes: Bug #2883
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/ovpnmain.cgi