Do not include query in redirect url if too long.

This commit is contained in:
Michal Čihař
2003-10-06 10:06:20 +00:00
parent f4ceff0e84
commit 5647ef073f
2 changed files with 5 additions and 1 deletions

View File

@@ -204,7 +204,8 @@ if (!$result) {
// if we have seen binary,
// we do not append the query to the Location so it won't be displayed
// on the resulting page
$add_query = (!$seen_binary ? '&disp_query=' . urlencode($sql_query) : '');
// Nijel: we also need to limit size of url...
$add_query = (!$seen_binary && strlen($sql_query) < 1024 ? '&disp_query=' . urlencode($sql_query) : '');
header('Location: ' . $cfg['PmaAbsoluteUri'] . $goto . '&disp_message=' . urlencode($message) . $add_query);
}
exit();