From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ZmvJS2lLnz32wY for ; Tue, 29 Apr 2025 08:54:32 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ZmvJS2cggz2xVK for ; Tue, 29 Apr 2025 08:54:32 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [172.28.1.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "people01.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ZmvJS0Q57zBn for ; Tue, 29 Apr 2025 08:54:32 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1745916872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=DvDhp2C0/FoS8NlxwKQDehSbkEAzCVdIJfiA5S6GbCc=; b=nHD4wM1tj5sCPkKNJSTuUqPW7/1FqkaFc5U3EoMR/zHzQDzJfb6csOiXr/QDgiC4KqpcAg WCbNueE0dRq5HjAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1745916872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=DvDhp2C0/FoS8NlxwKQDehSbkEAzCVdIJfiA5S6GbCc=; b=qZvRGPmHpvh5fc/Va45X8n6ZlK+2+HKCOu1KlBX6WdHujE9mlSapwLrhNzl0EBsRj68/x1 Ey543fVpcfa7M07Nj+qmGxaG1gCKo+VisvAMB5NiyEI6IcpDfeq9jPjDXnYF6Q8Gjw6PzD cld3TRFcyQewwGyHZuWjrAe6jfOvhQC4nK7EtPaPR+/4H9/f+6ZfM3jYfwkJa3I2aqavC5 DeA6GlI90IXbYfYZ7QvjI/iUy4c6Q6yH07kxF9H3vemPd+a5d6TuRxmE0NNL5833WMPx3n 1zoNeCAyKKLsIYdokK6CeUtI/eLFngVCcNT3iyWD0n3BrKfdwu8v1aswsI7LFA== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4ZmvJS01jHz2xnD; Tue, 29 Apr 2025 08:54:31 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 057b3e49c5e8aadb2c35ee2c65641ad7b073dacb X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: 43867c1e070fc96420a666b0bb21182eff16787b X-Git-Newrev: 057b3e49c5e8aadb2c35ee2c65641ad7b073dacb Message-Id: <4ZmvJS01jHz2xnD@people01.haj.ipfire.org> Date: Tue, 29 Apr 2025 08:54:31 +0000 (UTC) From: Michael Tremer Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, next has been updated via 057b3e49c5e8aadb2c35ee2c65641ad7b073dacb (commit) via c85560b8c558e95490687a1e798ae16d9652e74e (commit) via f9f02b4c244fea3025245348678bb08bbfbd48a8 (commit) from 43867c1e070fc96420a666b0bb21182eff16787b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 057b3e49c5e8aadb2c35ee2c65641ad7b073dacb Author: Michael Tremer Date: Tue Apr 29 08:54:07 2025 +0000 core195: Ship vpnmain.cgi This is because of changes that were applied late to c194. Signed-off-by: Michael Tremer commit c85560b8c558e95490687a1e798ae16d9652e74e Merge: 43867c1e07 f9f02b4c24 Author: Michael Tremer Date: Tue Apr 29 08:53:48 2025 +0000 Merge remote-tracking branch 'origin/master' into next ----------------------------------------------------------------------- Summary of changes: config/rootfiles/core/195/filelists/files | 1 + html/cgi-bin/vpnmain.cgi | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) Difference in files: diff --git a/config/rootfiles/core/195/filelists/files b/config/rootfiles/core/195/filelists/files index d8f95ae6c..a4b1b0eeb 100644 --- a/config/rootfiles/core/195/filelists/files +++ b/config/rootfiles/core/195/filelists/files @@ -11,6 +11,7 @@ srv/web/ipfire/cgi-bin/fwhosts.cgi srv/web/ipfire/cgi-bin/ids.cgi srv/web/ipfire/cgi-bin/pakfire.cgi srv/web/ipfire/cgi-bin/services.cgi +srv/web/ipfire/cgi-bin/vpnmain.cgi srv/web/ipfire/cgi-bin/wireguard.cgi srv/web/ipfire/html/themes/ipfire/include/css/style.css usr/lib/firewall/firewall-lib.pl diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 1c9f9243b..4f81fecdf 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -468,7 +468,7 @@ sub writeipsecfiles { $psk_line = ($lconfighash{$key}[7] ? $lconfighash{$key}[7] : $localside) . " " ; $psk_line .= $lconfighash{$key}[9] ? $lconfighash{$key}[9] : $lconfighash{$key}[10]; #remoteid or remote address? if ($lconfighash{$key}[40] eq 'YES') { - my $decoded_psk = MIME::Base64::decode_base64($lconfighash{$key}[5]); + my $decoded_psk = &MIME::Base64::decode_base64($lconfighash{$key}[5]); $psk_line .= " : PSK '$decoded_psk'\n"; } else { $psk_line .= " : PSK '$lconfighash{$key}[5]'\n"; @@ -1662,6 +1662,10 @@ END $cgiparams{'TYPE'} = $confighash{$cgiparams{'KEY'}}[3]; $cgiparams{'AUTH'} = $confighash{$cgiparams{'KEY'}}[4]; $cgiparams{'PSK'} = $confighash{$cgiparams{'KEY'}}[5]; + # Decode the PSK if it is base64-encoded + if ($cgiparams{'PSK'} && $confighash{$cgiparams{'KEY'}}[40] eq 'YES') { + $cgiparams{'PSK'} = &MIME::Base64::decode_base64($cgiparams{'PSK'}); + } $cgiparams{'LOCAL'} = $confighash{$cgiparams{'KEY'}}[6]; $cgiparams{'LOCAL_ID'} = $confighash{$cgiparams{'KEY'}}[7]; my @local_subnets = split(",", $confighash{$cgiparams{'KEY'}}[8]); @@ -1879,7 +1883,6 @@ END } if ($cgiparams{'AUTH'} eq 'psk') { - $cgiparams{'BASE_64'} = 'YES'; if (! length($cgiparams{'PSK'}) ) { $errormessage = $Lang::tr{'pre-shared key is too short'}; goto VPNCONF_ERROR; @@ -2248,7 +2251,7 @@ END my $key = $cgiparams{'KEY'}; if (! $key) { $key = &General::findhasharraykey (\%confighash); - foreach my $i (0 .. 39) { $confighash{$key}[$i] = "";} + foreach my $i (0 .. 40) { $confighash{$key}[$i] = "";} } $confighash{$key}[0] = $cgiparams{'ENABLED'}; $confighash{$key}[1] = $cgiparams{'NAME'}; @@ -2258,13 +2261,10 @@ END $confighash{$key}[3] = $cgiparams{'TYPE'}; if ($cgiparams{'AUTH'} eq 'psk') { $confighash{$key}[4] = 'psk'; - if ($cgiparams{'BASE_64'} eq 'YES') { - $confighash{$key}[5] = MIME::Base64::encode_base64($cgiparams{'PSK'}, ""); - $confighash{$key}[40] = 'YES'; - } else { - $confighash{$key}[5] = $cgiparams{'PSK'}; - $confighash{$key}[40] = ''; - } + + # Always store the PSK base64-encoded, even if it wasn't base64 before + $confighash{$key}[5] = &MIME::Base64::encode_base64($cgiparams{'PSK'}, ""); + $confighash{$key}[40] = 'YES'; } else { $confighash{$key}[4] = 'cert'; } hooks/post-receive -- IPFire 2.x development tree