diff options
author | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-06-02 20:09:23 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauriciofauth@gmail.com> | 2017-06-03 06:52:22 +0300 |
commit | e330402b5b57380587c576d1c03c542176423681 (patch) | |
tree | bcd0552fab0be5eb957d053ab32ed7d65c8d4b85 /url.php | |
parent | 2af08b93f10660db3e14884ff792ed153ec9df50 (diff) |
Refactor the core functions into static methods
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'url.php')
-rw-r--r-- | url.php | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -5,6 +5,8 @@ * * @package PhpMyAdmin */ + +use PMA\libraries\Core; use PMA\libraries\Sanitize; use PMA\libraries\Response; @@ -19,11 +21,11 @@ $response = Response::getInstance(); $response->getHeader()->sendHttpHeaders(); $response->disable(); -if (! PMA_isValid($_REQUEST['url']) +if (! Core::isValid($_REQUEST['url']) || ! preg_match('/^https:\/\/[^\n\r]*$/', $_REQUEST['url']) - || ! PMA_isAllowedDomain($_REQUEST['url']) + || ! Core::isAllowedDomain($_REQUEST['url']) ) { - PMA_sendHeaderLocation('./'); + Core::sendHeaderLocation('./'); } else { // JavaScript redirection is necessary. Because if header() is used // then web browser sometimes does not change the HTTP_REFERER |