diff options
| author | 2020-01-04 23:35:42 +0100 | |
|---|---|---|
| committer | 2020-01-04 23:35:42 +0100 | |
| commit | 2aff347b2e942286292b21e0b20d93ab85220a17 (patch) | |
| tree | a00c587dbaafe36da019dafca00b77357c3f58a8 /lib/Minz/Url.php | |
| parent | acc50df0efef8bd9fa937a5d640314c0e78e9117 (diff) | |
Fix wrong getHeader refactoring (#2749)
* Fix wrong getHeader refactoring
Fix regression introduced by
https://github.com/FreshRSS/FreshRSS/pull/2373
The refactoring required a call to init() even for static functions,
which is most of the time not done.
Removed premature abstraction of `$_SERVER`, which was the root cause of
the bug.
https://github.com/FreshRSS/FreshRSS/issues/2748#issuecomment-569898931
* Refactoring: Move serverIsPublic to Minz_Request
* Add mitigations for wrong configurations
Due to the regression, we have some existing configurations with a bad
base_url
* Forgot one instance
Diffstat (limited to 'lib/Minz/Url.php')
| -rw-r--r-- | lib/Minz/Url.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Minz/Url.php b/lib/Minz/Url.php index 1c222ce25..5828d47df 100644 --- a/lib/Minz/Url.php +++ b/lib/Minz/Url.php @@ -25,7 +25,7 @@ class Minz_Url { if ($absolute) { $url_string = Minz_Request::getBaseUrl(); - if ($url_string == '') { + if (strlen($url_string) < strlen('http://a.bc')) { $url_string = Minz_Request::guessBaseUrl(); if (PUBLIC_RELATIVE === '..') { //TODO: Implement proper resolver of relative parts such as /test/./../ |
