Fix bitbucket detection of redirects to login page, fixes #9041
parent
57f91d01c7
commit
6cb4dc41b8
|
@ -404,7 +404,7 @@ class RemoteFilesystem
|
||||||
if ($originUrl === 'bitbucket.org'
|
if ($originUrl === 'bitbucket.org'
|
||||||
&& !$this->isPublicBitBucketDownload($fileUrl)
|
&& !$this->isPublicBitBucketDownload($fileUrl)
|
||||||
&& substr($fileUrl, -4) === '.zip'
|
&& substr($fileUrl, -4) === '.zip'
|
||||||
&& (!$locationHeader || substr($locationHeader, -4) !== '.zip')
|
&& (!$locationHeader || substr(parse_url($locationHeader, PHP_URL_PATH), -4) !== '.zip')
|
||||||
&& $contentType && preg_match('{^text/html\b}i', $contentType)
|
&& $contentType && preg_match('{^text/html\b}i', $contentType)
|
||||||
) {
|
) {
|
||||||
$result = false;
|
$result = false;
|
||||||
|
|
Loading…
Reference in New Issue