Issue 14471: Fix wegfinger request

This commit is contained in:
Michael 2024-10-17 22:04:31 +00:00
parent 65fe8fcf41
commit b10255ca44

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)) {