summaryrefslogtreecommitdiffstats
path: root/etc/inc/ipsec.auth-user.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-12-08 19:44:53 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-12-08 19:44:53 -0200
commit9a92e2ef6431158442d039d85f0b349e638676c1 (patch)
treeaf4d02f271209afc76b97b2aa895c6e22ecb450a /etc/inc/ipsec.auth-user.php
parentae0daa804d426b0d8a0a107634214ca41fa2cb6b (diff)
downloadpfsense-9a92e2ef6431158442d039d85f0b349e638676c1.zip
pfsense-9a92e2ef6431158442d039d85f0b349e638676c1.tar.gz
Use exit instead of return here, otherwise script's return code is always 0 and user with wrong password is authenticated
Diffstat (limited to 'etc/inc/ipsec.auth-user.php')
-rwxr-xr-xetc/inc/ipsec.auth-user.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/ipsec.auth-user.php b/etc/inc/ipsec.auth-user.php
index 0bf702d..7fcf8c3 100755
--- a/etc/inc/ipsec.auth-user.php
+++ b/etc/inc/ipsec.auth-user.php
@@ -102,7 +102,7 @@ if (!$username || !$password) {
return;
} else {
closelog();
- return (-1);
+ exit (-1);
}
}
@@ -116,7 +116,7 @@ if (($strictusercn === true) && ($common_name != $username)) {
return;
} else {
closelog();
- return (1);
+ exit (1);
}
}
@@ -148,7 +148,7 @@ if ($authenticated == false) {
return;
} else {
closelog();
- return (-1);
+ exit (-1);
}
}
@@ -161,6 +161,6 @@ closelog();
if (isset($_GET['username']))
echo "OK";
else
- return (0);
+ exit (0);
?>
OpenPOWER on IntegriCloud