diff --git a/index.php b/index.php index 62abe96b1..617b3dd56 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,6 @@ * * @uses libraries/common.lib.php global fnctions * @uses libraries/relation.lib.php table relations - * @uses $_SESSION['window_name_hash'] to set it * @uses $GLOBALS['strNoFrames'] * @uses $GLOBALS['cfg']['QueryHistoryDB'] * @uses $GLOBALS['cfg']['Server']['user'] @@ -41,9 +40,6 @@ require_once('./libraries/common.lib.php'); */ require_once('./libraries/relation.lib.php'); -// hash for the window names, against window hijacking -$_SESSION['window_name_hash'] = time(); - // free the session file, for the other frames to be loaded session_write_close(); @@ -143,12 +139,12 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']); - - + + name="frame_content" /> <body> <p><?php echo $GLOBALS['strNoFrames']; ?></p> diff --git a/left.php b/left.php index 388493ad9..3eb68aac4 100644 --- a/left.php +++ b/left.php @@ -74,7 +74,7 @@ echo "<?xml version=\"1.0\" encoding=\"" . $GLOBALS['charset'] . "\"?".">"; <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" /> <base href="<?php echo $GLOBALS['cfg']['PmaAbsoluteUri']; ?>" - target="phpmain<?php echo $_SESSION['window_name_hash']; ?>" /> + target="frame_content" /> <link rel="stylesheet" type="text/css" href="./css/phpmyadmin.css.php?<?php echo PMA_generate_common_url( '', '' ); ?>&amp;js_frame=left" /> <script type="text/javascript" language="javascript"> diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 64d6849c1..94c00d510 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -101,10 +101,11 @@ function PMA_sqlQueryForm( $query = true, $display_tab = false ) { // start output if ( $is_querywindow ) { ?> - <form method="post" id="sqlqueryform" - target="phpmain<?php echo md5( $GLOBALS['cfg']['PmaAbsoluteUri'] ); ?>" + <form method="post" id="sqlqueryform" target="frame_content" action="import.php"<?php echo $enctype; ?> name="sqlform" - onsubmit="this.target=window.opener.frames[1].name; + onsubmit="save_name = window.opener.parent.frames[1].name; + window.opener.parent.frames[1].name = save_name + '<?php echo time(); ?>'; + this.target = window.opener.parent.frames[1].name; return checkSqlQuery( this );" > <?php } else {