summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-12 11:49:12 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-12 11:49:20 +0100
commit907cc718d13053c4c254a794d6bbabc5b2a42229 (patch)
treef2cf3034f08f4ac2519238fe2fcf6dd9adee0ef3 /usr/local/sbin
parentc80ad8a892a291e7f76be95be0242e9f1fe24aaf (diff)
downloadpfsense-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-xusr/local/sbin/ovpn_auth_verify2
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
OpenPOWER on IntegriCloud