mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Prevent echo to insert a newline(\n) at the secret string. Fixes #4177
This commit is contained in:
parent
7077addc5a
commit
5cd24cf110
@ -4,7 +4,7 @@ if [ "$1" = "tls" ]; then
|
||||
RESULT=$(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.tls-verify.php -d "servercn=$2&depth=$3&certdepth=$4&certsubject=$5")
|
||||
else
|
||||
# Single quoting $password breaks getting the value from the variable.
|
||||
password=$(echo ${password} | openssl enc -base64 | sed -e 's/=/%3D/g')
|
||||
password=$(echo -n ${password} | openssl enc -base64 | sed -e 's/=/%3D/g')
|
||||
RESULT=$(/usr/local/sbin/fcgicli -f /etc/inc/openvpn.auth-user.php -d "username=$username&password=$password&cn=$common_name&strictcn=$3&authcfg=$2&modeid=$4")
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user