mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
ovpnmain.cgi: Remove trailing newline from OTP secret
Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
c9dc7fdec0
commit
209d62f005
@@ -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] = '';
|
||||
|
||||
Reference in New Issue
Block a user