summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-08-30 08:14:36 -0400
committerSteve Beaver <sbeaver@netgate.com>2017-08-30 08:14:36 -0400
commitca44a37cad5e905e3a76b6ce862de6ec5d3bcb06 (patch)
treedd88cbaee39b2a54a2e1a0b048065192a6dff92b /src
parent634d68709128495b22caffef36f9351e3361e2ff (diff)
downloadpfsense-ca44a37cad5e905e3a76b6ce862de6ec5d3bcb06.zip
pfsense-ca44a37cad5e905e3a76b6ce862de6ec5d3bcb06.tar.gz
Restore bad username or password message
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/auth.inc2
-rw-r--r--src/etc/inc/authgui.inc16
2 files changed, 16 insertions, 2 deletions
diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc
index ec76e1d..aa658f3 100644
--- a/src/etc/inc/auth.inc
+++ b/src/etc/inc/auth.inc
@@ -1815,7 +1815,7 @@ function session_auth() {
exit;
} else {
/* give the user an error message */
- $_SESSION['Login_Error'] = "Username or Password incorrect";
+ $_SESSION['Login_Error'] = gettext("Username or Password incorrect");
log_auth("webConfigurator authentication error for '{$_POST['usernamefld']}' from {$_SERVER['REMOTE_ADDR']}");
if (isAjax()) {
echo "showajaxmessage('{$_SESSION['Login_Error']}');";
diff --git a/src/etc/inc/authgui.inc b/src/etc/inc/authgui.inc
index 934ff41..20d4039 100644
--- a/src/etc/inc/authgui.inc
+++ b/src/etc/inc/authgui.inc
@@ -34,7 +34,9 @@ if (!session_auth()) {
display_login_form();
exit;
}
+
phpsession_begin();
+
/*
* Once here, the user has authenticated with the web server.
* We give them access only to the appropriate pages based on
@@ -312,6 +314,7 @@ function display_login_form() {
<header>
<div id="headerrow">
<div class="row">
+ <!-- Header left logo box -->
<div class="col-sm-4">
<div id="logodiv" style="text-align:center" class="nowarning">
<svg role="img" aria-labelledby="pfsense-logo" x="0px" y="0px" viewBox="0 0 282.8 84.2" width="240" height="100%">
@@ -333,7 +336,18 @@ function display_login_form() {
</svg>
</div>
</div>
- <div class="col-sm-8 nowarning msgbox text-center">
+
+ <!-- Header center message box -->
+ <div class="col-sm-4 nowarning msgbox text-center text-danger">
+<?php
+ if (!empty($_POST['usernamefld'])) {
+ print("<h4>" . $_SESSION['Login_Error'] . "</h4>");
+ }
+?>
+ </div>
+
+ <!-- Header right message box (hostname or msg)-->
+ <div class="col-sm-4 nowarning msgbox text-center">
<span id="hostspan">
<a><h4><?=$loginbannerstr?></h4></a>
</span>
OpenPOWER on IntegriCloud