Skip to content

Commit 5fc8020

Browse files
committed
Ensure links from setup go through url.php
Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent b061096 commit 5fc8020

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Diff for: libraries/core.lib.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ function PMA_arrayRemove($path, &$array)
724724
*/
725725
function PMA_linkURL($url)
726726
{
727-
if (!preg_match('#^https?://#', $url) || defined('PMA_SETUP')) {
727+
if (!preg_match('#^https?://#', $url)) {
728728
return $url;
729729
}
730730

@@ -739,7 +739,12 @@ function PMA_linkURL($url)
739739
$arr = parse_url($url);
740740
parse_str($arr["query"], $vars);
741741
$query = http_build_query(array("url" => $vars["url"]));
742-
$url = './url.php?' . $query;
742+
743+
if (defined('PMA_SETUP')) {
744+
$url = '../url.php?' . $query;
745+
} else {
746+
$url = './url.php?' . $query;
747+
}
743748

744749
return $url;
745750
}

Diff for: setup/frames/index.inc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@
307307

308308
echo '</fieldset>';
309309
echo '<div id="footer">';
310-
echo '<a href="https://www.phpmyadmin.net/">' , __('phpMyAdmin homepage') , '</a>';
311-
echo '<a href="https://www.phpmyadmin.net/donate/">'
310+
echo '<a href="../url.php?url=https://www.phpmyadmin.net/">' , __('phpMyAdmin homepage') , '</a>';
311+
echo '<a href="../url.php?url=https://www.phpmyadmin.net/donate/">'
312312
, __('Donate') , '</a>';
313313
echo '<a href="' , PMA_URL_getCommon() , $separator , 'version_check=1">'
314314
, __('Check for latest version') , '</a>';

0 commit comments

Comments
 (0)