Make redirector require valid token

This commit is contained in:
Michal Čihař
2011-05-20 09:01:20 +02:00
parent 32d8446e01
commit ecfc8ba4f7
3 changed files with 7 additions and 8 deletions

View File

@@ -681,12 +681,15 @@ function PMA_array_remove($path, &$array)
* @return string URL for a link.
*/
function PMA_linkURL($url) {
$params = array();
$params['url'] = $url;
$goto = 'url.php' . PMA_generate_common_url($params);
if (!preg_match('#^https?://#', $url)) {
return $url;
} elseif (defined('PMA_SETUP')) {
return '../url.php?url=' . $url;
return '../' . $goto;
} else {
return './url.php?url=' . $url;
return './' . $goto;
}
}