]> git.mxchange.org Git - friendica.git/commitdiff
Return 400 error code when webfinger request omits resource parameter. Fixes #14292
authorMatthew Exon <git.mexon@spamgourmet.com>
Thu, 11 Jul 2024 16:18:54 +0000 (18:18 +0200)
committerMatthew Exon <git.mexon@spamgourmet.com>
Thu, 11 Jul 2024 16:18:54 +0000 (18:18 +0200)
src/Module/Xrd.php

index 7a983538a14ffc8a7142174d662617f90f46974e..693ba34e2b9cd8125978b8cc756d0628bb4456e4 100644 (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']));