summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-12-17 00:01:21 +0100
committerErmal LUÇI <eri@pfsense.org>2014-12-17 00:01:21 +0100
commit059929826e3b7bfbae067599d3a0f17e160fa35e (patch)
tree1a8944816cbfa98e64269c9a12e0eebb3a218a7a /usr
parent50b00432b84ea4ee6efe1c292aee4ec2a40a14e3 (diff)
downloadpfsense-059929826e3b7bfbae067599d3a0f17e160fa35e.zip
pfsense-059929826e3b7bfbae067599d3a0f17e160fa35e.tar.gz
Encode space to avoid rejecting users with spaces in username
Diffstat (limited to 'usr')
-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 d9ffb15..c1e147f 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} | /usr/bin/sed 's/&/%26/g')
+ password=$(echo ${password} | /usr/bin/sed -e 's/&/%26/g' -e 's/ /%20/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