Merge pull request #27455 from nextcloud/backport/27444/stable21

[stable21] Header must contain a colon
This commit is contained in:
Christoph Wurst 2021-06-11 08:26:53 +02:00 committed by GitHub
commit 234f39e1b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,7 +111,7 @@ class PublicAuth extends AbstractBasic {
if (in_array('XMLHttpRequest', explode(',', $this->request->getHeader('X-Requested-With')))) {
// do not re-authenticate over ajax, use dummy auth name to prevent browser popup
http_response_code(401);
header('WWW-Authenticate','DummyBasic realm="' . $this->realm . '"');
header('WWW-Authenticate: DummyBasic realm="' . $this->realm . '"');
throw new \Sabre\DAV\Exception\NotAuthenticated('Cannot authenticate over ajax calls');
}
return false;