make a new session before bouncing to PMA to avoid leaking our session, also direct to the right server

This commit is contained in:
Antoine Beaupr�� 2014-11-21 17:40:07 +00:00
parent 2695b09f6a
commit 8d6ad39913
1 changed files with 6 additions and 1 deletions

View File

@ -32,13 +32,18 @@ require_once("../class/config.php");
if (!$r=$mysql->php_myadmin_connect()) { if (!$r=$mysql->php_myadmin_connect()) {
$error=$err->errstr(); $error=$err->errstr();
} else { } else {
session_write_close();
// SSO of PhpMyAdmin // SSO of PhpMyAdmin
session_set_cookie_params(0, '/', '', 0);
session_name('AlternC_Panel');
session_start();
$_SESSION['PMA_single_signon_user'] = $r["login"]; $_SESSION['PMA_single_signon_user'] = $r["login"];
$_SESSION['PMA_single_signon_password'] = $r["pass"]; $_SESSION['PMA_single_signon_password'] = $r["pass"];
$_SESSION['PMA_single_signon_host'] = $r["host"]; // pma >= 2.11 $_SESSION['PMA_single_signon_host'] = $r["host"]; // pma >= 2.11
session_write_close();
// finally redirect to phpMyAdmin : // finally redirect to phpMyAdmin :
header("Location: /alternc-sql/"); header("Location: /alternc-sql/index.php?server=1");
exit(); exit();
} }