diff options
author | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 11:49:12 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 11:49:20 +0100 |
commit | 907cc718d13053c4c254a794d6bbabc5b2a42229 (patch) | |
tree | f2cf3034f08f4ac2519238fe2fcf6dd9adee0ef3 /usr/local/sbin | |
parent | c80ad8a892a291e7f76be95be0242e9f1fe24aaf (diff) | |
download | pfsense-907cc718d13053c4c254a794d6bbabc5b2a42229.zip pfsense-907cc718d13053c4c254a794d6bbabc5b2a42229.tar.gz |
Put the value of password under double quotes(") to avoid issues with special characters in passwords. Ticket #4177
Diffstat (limited to 'usr/local/sbin')
-rwxr-xr-x | usr/local/sbin/ovpn_auth_verify | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/sbin/ovpn_auth_verify b/usr/local/sbin/ovpn_auth_verify index 0951e24..894c8da 100755 --- a/usr/local/sbin/ovpn_auth_verify +++ b/usr/local/sbin/ovpn_auth_verify @@ -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 -n ${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 |