diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc index f981e0eb7..4d190e6be 100644 --- a/src/etc/inc/auth.inc +++ b/src/etc/inc/auth.inc @@ -100,7 +100,7 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][ if ($found_host == false) { if (!security_checks_disabled()) { - display_error_form("501", sprintf(gettext("A potential %sDNS Rebind attack%s has been detected.%sTry to access the router by IP address instead of by hostname."), '', '', '
')); + display_error_form(sprintf(gettext("A potential %sDNS Rebind attack%s has been detected.%sTry to access the router by IP address instead of by hostname."), '', '', '
')); exit; } $security_passed = false; @@ -169,7 +169,7 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][ } if ($found_host == false) { if (!security_checks_disabled()) { - display_error_form('501', sprintf( + display_error_form(sprintf( gettext('The HTTP_REFERER "%s" does not match the predefined settings. You can disable this check if needed under System: Settings: Administration.'), html_safe($_SERVER['HTTP_REFERER']) )); diff --git a/src/etc/inc/authgui.inc b/src/etc/inc/authgui.inc index 71376d51c..d5fbc3211 100644 --- a/src/etc/inc/authgui.inc +++ b/src/etc/inc/authgui.inc @@ -204,7 +204,7 @@ set_language(); /* * redirect to first allowed page if requesting a wrong url */ -if ($_SERVER['REQUEST_URI'] == '/') { +if ($_SERVER['REQUEST_URI'] == '/') { $page = '/index.php'; } else { /* reconstruct page uri to use actual script location, mimic realpath() behaviour */ @@ -228,7 +228,7 @@ if ($_SESSION['Username'] != 'root' && !$acl->isPageAccessible($_SESSION['Userna header(url_safe("Location: /{$page}")); exit; } else { - display_error_form("201", gettext("No page assigned to this user! Click here to logout.")); + display_error_form(gettext('No page assigned to this user! Click here to logout.')); exit; } } @@ -236,8 +236,10 @@ if ($_SESSION['Username'] != 'root' && !$acl->isPageAccessible($_SESSION['Userna /* * determine if the user is allowed access to the requested page */ -function display_error_form($http_code, $desc) +function display_error_form($text) { + global $g; + $themename = htmlspecialchars(get_current_theme()); ?> @@ -255,26 +257,25 @@ function display_error_form($http_code, $desc) - <?=$http_code?> + <?= gettext('Error') ?> | <?= $g['product_name'] ?> " rel="stylesheet"> " rel="shortcut icon"> + + -
-

 

- -

- - - +

+

 

+

+

- + - <?=gettext("Login"); ?> + <?= gettext('Login') ?> | <?= $g['product_name'] ?> " rel="stylesheet"> " rel="shortcut icon"> @@ -390,4 +391,4 @@ function display_login_form($Login_Error) -