Use GET and POST explicitely as cookies can override values in REQUEST (bug #1481584).

This commit is contained in:
Michal Čihař
2006-05-05 09:30:13 +00:00
parent cd55bb7ccb
commit 3f9e28ae66
2 changed files with 17 additions and 5 deletions

View File

@@ -7,7 +7,9 @@ $Source$
2006-05-05 Michal Čihař <michal@cihar.com>
* libraries/export/sql.php: Fix UPDATE export with extended inserts
enabled (bug#1482103), fix export type selection.
enabled (bug #1482103), fix export type selection.
* libraries/select_lang.lib.php: Use GET and POST explicitely as cookies
can override values in REQUEST (bug #1481584).
2006-05-03 Michal Čihař <michal@cihar.com>
* Documentation.html: Document OpenDocument export and various fixes.

View File

@@ -34,12 +34,22 @@ function PMA_langCheck()
}
}
// check user requested language
if (! empty($_REQUEST['lang'])) {
if (PMA_langSet($_REQUEST['lang'])) {
// Don't use REQUEST in following code as it might be confused by cookies with same name
// check user requested language (POST)
if (! empty($_POST['lang'])) {
if (PMA_langSet($_POST['lang'])) {
return true;
} else {
$GLOBALS['lang_failed_request'] = $_REQUEST['lang'];
$GLOBALS['lang_failed_request'] = $_POST['lang'];
}
}
// check user requested language (GET)
if (! empty($_GET['lang'])) {
if (PMA_langSet($_GET['lang'])) {
return true;
} else {
$GLOBALS['lang_failed_request'] = $_GET['lang'];
}
}