[auth] Add custom port configuration in signon
This commit is contained in:
@@ -41,6 +41,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
+ [export] Added MediaWiki export module,
|
||||
thanks to Derek Schaefer - drummingds1
|
||||
+ [lang] Turkish update, thanks to Burak Yavuz
|
||||
+ [auth] Add custom port configuration in signon, thanks to Gary Smith
|
||||
|
||||
3.2.3.0 (not yet released)
|
||||
- patch #2856664 [export] Date, time, and datetime column types now export correctly to
|
||||
|
@@ -61,6 +61,9 @@ function PMA_auth_check()
|
||||
/* Current host */
|
||||
$single_signon_host = $GLOBALS['cfg']['Server']['host'];
|
||||
|
||||
/* Current port */
|
||||
$single_signon_port = $GLOBALS['cfg']['Server']['port'];
|
||||
|
||||
/* Are we requested to do logout? */
|
||||
$do_logout = !empty($_REQUEST['old_usr']);
|
||||
|
||||
@@ -94,6 +97,12 @@ function PMA_auth_check()
|
||||
if (isset($_SESSION['PMA_single_signon_host'])) {
|
||||
$single_signon_host = $_SESSION['PMA_single_signon_host'];
|
||||
}
|
||||
|
||||
if (isset($_SESSION['PMA_single_signon_port'])) {
|
||||
$single_signon_port = $_SESSION['PMA_single_signon_port'];
|
||||
}
|
||||
|
||||
|
||||
/* 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 */
|
||||
@@ -113,6 +122,8 @@ function PMA_auth_check()
|
||||
/* Set the single signon host */
|
||||
$GLOBALS['cfg']['Server']['host']=$single_signon_host;
|
||||
|
||||
/* Set the single signon port */
|
||||
$GLOBALS['cfg']['Server']['port'] = $single_signon_port;
|
||||
/* Restore our token */
|
||||
if (!empty($pma_token)) {
|
||||
$_SESSION[' PMA_token '] = $pma_token;
|
||||
|
@@ -24,6 +24,7 @@ if (isset($_POST['user'])) {
|
||||
$_SESSION['PMA_single_signon_user'] = $_POST['user'];
|
||||
$_SESSION['PMA_single_signon_password'] = $_POST['password'];
|
||||
$_SESSION['PMA_single_signon_host'] = $_POST['host'];
|
||||
$_SESSION['PMA_single_signon_port'] = $_POST['port'];
|
||||
$id = session_id();
|
||||
/* Close that session */
|
||||
session_write_close();
|
||||
@@ -47,6 +48,7 @@ if (isset($_POST['user'])) {
|
||||
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 />
|
||||
Port: (will use the one from config.inc.php by default) <input type="text" name="port" /><br />
|
||||
<input type="submit" />
|
||||
</form>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user