summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin
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:58 +0100
commitcc2c1a3cc7fd8bdd6c458b922f536d56c6443e32 (patch)
tree93c1dd4f9809e472a0611db0a7824e6faee610d7 /usr/local/sbin
parent55edb8d68b435b216cf07e3d01c42f84157ff3f8 (diff)
downloadpfsense-cc2c1a3cc7fd8bdd6c458b922f536d56c6443e32.zip
pfsense-cc2c1a3cc7fd8bdd6c458b922f536d56c6443e32.tar.gz
Encode space to avoid rejecting users with spaces in username
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 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