1
0
Fork 0

Fix bitbucket detection of redirects to login page, fixes #9041

pull/9056/head
Jordi Boggiano 2020-07-16 12:26:48 +02:00
parent 57f91d01c7
commit 6cb4dc41b8
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -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;