Merge pull request #14293 from mexon/mat/webfinger-no-resource

Return 400 error code when webfinger request omits resource parameter.
This commit is contained in:
Michael Vogel 2024-07-11 18:42:35 +02:00 committed by GitHub
commit b76ba423f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,7 +44,7 @@ class Xrd extends BaseModule
// @TODO: Replace with parameter from router
if (DI::args()->getArgv()[0] == 'xrd') {
if (empty($_GET['uri'])) {
return;
throw new BadRequestException();
}
$uri = urldecode(trim($_GET['uri']));
@ -55,7 +55,7 @@ class Xrd extends BaseModule
}
} else {
if (empty($_GET['resource'])) {
return;
throw new BadRequestException();
}
$uri = urldecode(trim($_GET['resource']));