Merge pull request #14473 from annando/issue-14471

Issue 14471: Fix webfinger request
This commit is contained in:
Tobias Diekershoff 2024-10-18 06:46:12 +02:00 committed by GitHub
commit 159e6e79dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,14 +33,14 @@ class Xrd extends BaseModule
} }
$uri = urldecode(trim($_GET['uri'])); $uri = urldecode(trim($_GET['uri']));
$mode = self::getAcceptedContentType($_SERVER['HTTP_ACCEPT'] ?? '', Response::TYPE_JSON); $mode = self::getAcceptedContentType($_SERVER['HTTP_ACCEPT'] ?? '', Response::TYPE_XML);
} else { } else {
if (empty($_GET['resource'])) { if (empty($_GET['resource'])) {
throw new BadRequestException(); throw new BadRequestException();
} }
$uri = urldecode(trim($_GET['resource'])); $uri = urldecode(trim($_GET['resource']));
$mode = self::getAcceptedContentType($_SERVER['HTTP_ACCEPT'] ?? '', Response::TYPE_XML); $mode = self::getAcceptedContentType($_SERVER['HTTP_ACCEPT'] ?? '', Response::TYPE_JSON);
} }
if (Network::isValidHttpUrl($uri)) { if (Network::isValidHttpUrl($uri)) {