rfe #2936156 [auth] Signon authentication forwards error message through session data.

This commit is contained in:
Michal Čihař
2010-01-21 15:22:34 +00:00
parent 6ef24edd6a
commit ac9d23f535
3 changed files with 18 additions and 6 deletions

View File

@@ -24,6 +24,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
+ rfe #1435032 [interface] Move SSL status to the end, it is usually empty.
+ rfe #1340812 [interface] Show numbers of columns in table structure.
+ rfe #1186511 [inrerface] Add link to reload navigation frame.
+ rfe #2936156 [auth] Signon authentication forwards error message through session data.
3.3.0.0 (not yet released)
+ rfe #2308632 [edit] Use hex for (var)binary fields,

View File

@@ -173,14 +173,20 @@ function PMA_auth_set_user()
*/
function PMA_auth_fails()
{
$error = PMA_DBI_getError();
if ($error && $GLOBALS['errno'] != 1045) {
PMA_fatalError($error);
if (! empty($GLOBALS['login_without_password_is_forbidden'])) {
$_SESSION['PMA_single_signon_error_message'] = $GLOBALS['strLoginWithoutPassword'];
} elseif (! empty($GLOBALS['allowDeny_forbidden'])) {
$_SESSION['PMA_single_signon_error_message'] = $GLOBALS['strAccessDenied'];
} elseif (! empty($GLOBALS['no_activity'])) {
$_SESSION['PMA_single_signon_error_message'] = sprintf($GLOBALS['strNoActivity'], $GLOBALS['cfg']['LoginCookieValidity']);
} elseif (PMA_DBI_getError()) {
$_SESSION['PMA_single_signon_error_message'] = PMA_sanitize(PMA_DBI_getError());
} elseif (isset($php_errormsg)) {
$_SESSION['PMA_single_signon_error_message'] = $php_errormsg;
} else {
PMA_auth();
return true;
$_SESSION['PMA_single_signon_error_message'] = $GLOBALS['strCannotLogin'];
}
PMA_auth();
} // end of the 'PMA_auth_fails()' function
?>

View File

@@ -44,6 +44,11 @@ if (isset($_POST['user'])) {
<title>phpMyAdmin single signon example</title>
</head>
<body>
<?php
if (isset($_SESSION['PMA_single_signon_error_message'])) {
echo '<p class="error">' . $_SESSION['PMA_single_signon_port'] . '</p>';
}
?>
<form action="signon.php" method="post">
Username: <input type="text" name="user" /><br />
Password: <input type="password" name="password" /><br />