Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 23 lines (20 sloc) 0.471 kB
dc0c693 @nijel [security] Redirect external links to avoid Referer leakage.
nijel authored
1 <?php
3a3da29 @ruleant add vim directive for indenting with spaces
ruleant authored
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
dc0c693 @nijel [security] Redirect external links to avoid Referer leakage.
nijel authored
3 /**
4 * URL redirector to avoid leaking Referer with some sensitive information.
fe9de9d @nijel Add missing @package tag
nijel authored
5 *
6 * @package PhpMyAdmin
dc0c693 @nijel [security] Redirect external links to avoid Referer leakage.
nijel authored
7 */
8
9 /**
10 * Gets core libraries and defines some variables
11 */
12 require_once './libraries/common.inc.php';
13
8243eac @madhuracj Wrap some long lines
madhuracj authored
14 if (! PMA_isValid($_GET['url'])
15 || ! preg_match('/^https?:\/\/[^\n\r]*$/', $_GET['url'])
16 ) {
dc0c693 @nijel [security] Redirect external links to avoid Referer leakage.
nijel authored
17 header('Location: ' . $cfg['PmaAbsoluteUri']);
18 } else {
ecfc8ba @nijel Make redirector require valid token
nijel authored
19 header('Location: ' . $_GET['url']);
dc0c693 @nijel [security] Redirect external links to avoid Referer leakage.
nijel authored
20 }
18b8f21 Backport commit 4521b28 to fix bug #3527531, die after sending Locati…
J.M authored
21 die();
dc0c693 @nijel [security] Redirect external links to avoid Referer leakage.
nijel authored
22 ?>
Something went wrong with that request. Please try again.