Skip to content

Commit

Permalink
Merge pull request #11670 from nextcloud/bugfix/noid/fix-authenticati…
Browse files Browse the repository at this point in the history
…on-with-email-addresses

fix(federation): Don't continue reading headers when it's not federation
  • Loading branch information
nickvergessen authored Feb 28, 2024
2 parents 0e1ebde + da85dfa commit 6678d24
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Federation/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public function __construct(

protected function readHeaders(): void {
$this->isFederationRequest = (bool) $this->request->getHeader('X-Nextcloud-Federation');
if (!$this->isFederationRequest) {
$this->federationCloudId = '';
$this->accessToken = '';
return;
}

$authUser = $this->request->server['PHP_AUTH_USER'] ?? '';
$authUser = urldecode($authUser);
Expand Down

0 comments on commit 6678d24

Please sign in to comment.