diff options
author | Christian Schneider | 2025-02-08 15:53:32 +0100 |
---|---|---|
committer | Christian Schneider | 2025-02-08 15:54:28 +0100 |
commit | 9e66b8954deb4e2d43cbfd45530430272a128796 (patch) | |
tree | 7f0a1c0b94fe7b5144103f688c574ada7b13e363 /it_url.class | |
parent | feb4aaad35a5dba5eaaad645ca49f12bd5869319 (diff) | |
download | itools-9e66b8954deb4e2d43cbfd45530430272a128796.tar.gz itools-9e66b8954deb4e2d43cbfd45530430272a128796.tar.bz2 itools-9e66b8954deb4e2d43cbfd45530430272a128796.zip |
Truncate overly long referers leading to failed subrequest but make sure it is still propery urlencoded (mail5960)
Diffstat (limited to 'it_url.class')
-rw-r--r-- | it_url.class | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class index 8ac71ae..5777c98 100644 --- a/it_url.class +++ b/it_url.class @@ -192,7 +192,7 @@ static function _default_headers($url, $p) 'Host' => $url->realhostname . $url->explicitport, 'User-Agent' => "Mozilla/5.0 (compatible; ITools; Chrome/70.0.3538.102 Safari/537.36 Edge/18.19582)", 'Accept-Language' => $p['headers']['Accept-Language'] ?? ($search_subrequest ? T_defaultlang() : T_lang()), # can prevent loading of it_text - 'Referer' => it::match('([-\w]+\.\w+)$', $url->hostname) == it::match('([-\w]+\.\w+)$', $_SERVER['HTTP_HOST']) ? static::absolute(U($_GET)) : null, + 'Referer' => it::match('([-\w]+\.\w+)$', $url->hostname) == it::match('([-\w]+\.\w+)$', $_SERVER['HTTP_HOST']) ? it::replace(['%[0-9a-f]?$' => ''], substr(static::absolute(U($_GET)), 0, 8000)) : null, # Truncate overly long referers leading to failed subrequest but make sure it is still propery urlencoded 'X-Ultra-Https' => $_SERVER['HTTPS'], ]); |