patch #1712514 specify host for single signon, thanks to Thierry
This commit is contained in:
@@ -66,6 +66,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
+ [gui] Insert/Edit: no longer display the Go button each 15 lines
|
||||
but just at the end of a row
|
||||
+ [gui] Query window: use verbose server name if any
|
||||
+ [auth] patch #1712514 specify host for single signon, thanks to Thierry
|
||||
|
||||
2.10.2.0 (not yet released)
|
||||
|
||||
|
@@ -57,6 +57,9 @@ function PMA_auth_check()
|
||||
/* Session name */
|
||||
$session_name = $GLOBALS['cfg']['Server']['SignonSession'];
|
||||
|
||||
/* Current host */
|
||||
$single_signon_host = $GLOBALS['cfg']['Server']['host'];
|
||||
|
||||
/* Are we requested to do logout? */
|
||||
$do_logout = !empty($_REQUEST['old_usr']);
|
||||
|
||||
@@ -87,6 +90,9 @@ function PMA_auth_check()
|
||||
$PHP_AUTH_PW = $_SESSION['PMA_single_signon_password'];
|
||||
}
|
||||
}
|
||||
if (isset($_SESSION['PMA_single_signon_host'])) {
|
||||
$single_signon_host = $_SESSION['PMA_single_signon_host'];
|
||||
}
|
||||
/* Also get token as it is needed to access subpages */
|
||||
if (isset($_SESSION['PMA_single_signon_token'])) {
|
||||
/* No need to care about token on logout */
|
||||
@@ -103,6 +109,9 @@ function PMA_auth_check()
|
||||
}
|
||||
session_start();
|
||||
|
||||
/* Set the single signon host */
|
||||
$GLOBALS['cfg']['Server']['host']=$single_signon_host;
|
||||
|
||||
/* Restore our token */
|
||||
if (!empty($pma_token)) {
|
||||
$_SESSION[' PMA_token '] = $pma_token;
|
||||
|
@@ -23,6 +23,7 @@ if (isset($_POST['user'])) {
|
||||
/* Store there credentials */
|
||||
$_SESSION['PMA_single_signon_user'] = $_POST['user'];
|
||||
$_SESSION['PMA_single_signon_password'] = $_POST['password'];
|
||||
$_SESSION['PMA_single_signon_host'] = $_POST['host'];
|
||||
$id = session_id();
|
||||
/* Close that session */
|
||||
session_write_close();
|
||||
@@ -45,6 +46,7 @@ if (isset($_POST['user'])) {
|
||||
<form action="signon.php" method="post">
|
||||
Username: <input type="text" name="user" /><br />
|
||||
Password: <input type="password" name="password" /><br />
|
||||
Host: (will use the one from config.inc.php by default) <input type="text" name="host" /><br />
|
||||
<input type="submit" />
|
||||
</form>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user