diff options
| author | 2014-09-17 14:21:56 +0200 | |
|---|---|---|
| committer | 2014-09-17 14:21:56 +0200 | |
| commit | fc7d2a0bf271e43a9e6001dccef61ec0762eb840 (patch) | |
| tree | 3b59047da35e6acca85d0e0831f3e8951e11402f /lib/Minz | |
| parent | 75bf305b2f084958d43689b3781d03a29cc21f60 (diff) | |
Move http referer test into lib_rss
Rename method (coding style)
Change in app/FreshRSS.php
Improve test of app/install.php
Diffstat (limited to 'lib/Minz')
| -rw-r--r-- | lib/Minz/Request.php | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index ec4e25a6b..52f53012f 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -84,20 +84,6 @@ class Minz_Request { return $_SERVER['HTTP_HOST']; } - public static function isRefererFromSameDomain() { - if (empty($_SERVER['HTTP_REFERER'])) { - return false; - } - $host = parse_url(((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ? 'https://' : 'http://') . - (empty($_SERVER['HTTP_HOST']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'])); - $referer = parse_url($_SERVER['HTTP_REFERER']); - if (empty($host['scheme']) || empty($referer['scheme']) || $host['scheme'] !== $referer['scheme'] || - empty($host['host']) || empty($referer['host']) || $host['host'] !== $referer['host']) { - return false; - } - return (isset($host['port']) ? $host['port'] : 0) === (isset($referer['port']) ? $referer['port'] : 0); - } - /** * Détermine la base de l'url * @return la base de l'url |
