summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-09-13 19:30:07 +0000
committerErmal <eri@pfsense.org>2011-09-13 19:30:07 +0000
commit90477318aad050eb1f1b5282fac790f2a985fce3 (patch)
tree9e6201034296f1926165fc2632ca3a7384e4c9ef
parent2100a4542e924df509a8ca8a43116a448ffa61ca (diff)
downloadpfsense-90477318aad050eb1f1b5282fac790f2a985fce3.zip
pfsense-90477318aad050eb1f1b5282fac790f2a985fce3.tar.gz
Fixes #1874. Correctly error out when the user or the pass is not posted during login of CP.
-rwxr-xr-xusr/local/captiveportal/index.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index 04f0cc6..040b6bb 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -205,15 +205,18 @@ EOD;
} else if ($_POST['accept'] && $config['captiveportal'][$cpzone]['auth_method'] == "local") {
+ if ($_POST['auth_user'] && $_POST['auth_pass']) {
//check against local user manager
$loginok = local_backed($_POST['auth_user'], $_POST['auth_pass']);
- if ($loginok){
- captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"LOGIN");
- portal_allow($clientip, $clientmac,$_POST['auth_user']);
- } else {
- captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"FAILURE");
+ if ($loginok){
+ captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"LOGIN");
+ portal_allow($clientip, $clientmac,$_POST['auth_user']);
+ } else {
+ captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"FAILURE");
+ portal_reply_page($redirurl, "error", $errormsg);
+ }
+ } else
portal_reply_page($redirurl, "error", $errormsg);
- }
} else if ($_POST['accept'] && $clientip && $config['captiveportal'][$cpzone]['auth_method'] == "none") {
captiveportal_logportalauth("unauthenticated",$clientmac,$clientip,"ACCEPT");
portal_allow($clientip, $clientmac, "unauthenticated");
OpenPOWER on IntegriCloud