summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-12 11:40:46 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-12 11:40:46 +0100
commit21165e6455f1402eb6b319dd515a6b43f0bb0e04 (patch)
treef36f9af3b691501abe5fbf1ca559b622df256259 /usr/local
parentaa685f7a6d8a724ffe78bd2b4397714c7faff8b7 (diff)
downloadpfsense-21165e6455f1402eb6b319dd515a6b43f0bb0e04.zip
pfsense-21165e6455f1402eb6b319dd515a6b43f0bb0e04.tar.gz
Prevent echo to insert a newline(\n) at the secret string. Fixes #4177
Diffstat (limited to 'usr/local')
-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 087451f..0951e24 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 ${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