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