diff options
author | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 11:40:46 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2015-01-12 11:40:55 +0100 |
commit | 5cd24cf110ed3b5919922de4437ea3344f54eaea (patch) | |
tree | 0aa27105a4cbed4282471a0a5ff532eb4045ba2a /usr/local/sbin | |
parent | 7077addc5a5058fab4b4dc7678270c1000d342c9 (diff) | |
download | pfsense-5cd24cf110ed3b5919922de4437ea3344f54eaea.zip pfsense-5cd24cf110ed3b5919922de4437ea3344f54eaea.tar.gz |
Prevent echo to insert a newline(\n) at the secret string. Fixes #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 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 |