summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-11-18 23:35:27 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-11-18 23:35:27 +0000
commitbe23be5acb466b0b61814d67b52292d8aa5f0f75 (patch)
tree7c4d80d7d013cd50a25d5064ffd39800f95c6c5c
parent950f0f9e08c6e6dd8dd6a4908d72acf41e6e2bdc (diff)
downloadpfsense-be23be5acb466b0b61814d67b52292d8aa5f0f75.zip
pfsense-be23be5acb466b0b61814d67b52292d8aa5f0f75.tar.gz
* Correctly report invalid password
* Correctly report invalid username * Correctly report 401 errors
-rw-r--r--etc/inc/auth.inc8
-rw-r--r--usr/local/www/headjs.php2
2 files changed, 9 insertions, 1 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 26486e1..bdc6487 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -344,8 +344,16 @@ function session_auth($backing) {
/* give the user a more detailed error message */
if (isset($userindex[$_POST['usernamefld']])) {
$_SESSION['Login_Error'] = "Wrong password";
+ if(isAjax()) {
+ echo "showajaxmessage('Wrong password');";
+ return;
+ }
} else {
$_SESSION['Login_Error'] = "User does not exist";
+ if(isAjax()) {
+ echo "showajaxmessage('User does not exist');";
+ return;
+ }
}
}
}
diff --git a/usr/local/www/headjs.php b/usr/local/www/headjs.php
index 09b1b44..034daf0 100644
--- a/usr/local/www/headjs.php
+++ b/usr/local/www/headjs.php
@@ -82,7 +82,7 @@ function getHeadJS() {
var responseText = resp.responseText;
// debugging helper
- alert(responseText);
+ // alert(responseText);
if(responseText.indexOf('html') > 0) {
/* somehow we have been fed an html page! */
OpenPOWER on IntegriCloud