From: Timo Eissler Date: Tue, 14 Jun 2022 18:56:12 +0000 (+0200) Subject: ovpnmain.cgi: Remove trailing newline from OTP secret X-Git-Tag: v2.27-core170~61^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=209d62f0058c88e038760bc07773072fed0050da;p=ipfire-2.x.git ovpnmain.cgi: Remove trailing newline from OTP secret Signed-off-by: Timo Eissler --- diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 71c79ef471..f5ebc9dee2 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -4487,6 +4487,7 @@ if ($cgiparams{'TYPE'} eq 'net') { $confighash{$key}[43] = $cgiparams{'OTP_STATE'}; if (($confighash{$key}[43] eq 'on') && ($confighash{$key}[44] eq '')) { my @otp_secret = &General::system_output("/usr/bin/openssl", "rand", "-hex", "20"); + chomp($otp_secret[0]); $confighash{$key}[44] = $otp_secret[0]; } elsif ($confighash{$key}[43] eq '') { $confighash{$key}[44] = '';