]> git.mxchange.org Git - friendica.git/blobdiff - mod/xrd.php
And still there are notices that have to be removed ... (#5629)
[friendica.git] / mod / xrd.php
index 0cc5dba45b51fde179bfaff2c8e5d957ef44618f..61505f29966e99d2ea4f66f27d2cb091a8bf16cc 100644 (file)
@@ -12,6 +12,10 @@ use Friendica\Protocol\Salmon;
 function xrd_init(App $a)
 {
        if ($a->argv[0] == 'xrd') {
+               if (empty($_GET['uri'])) {
+                       killme();
+               }
+
                $uri = urldecode(notags(trim($_GET['uri'])));
                if (defaults($_SERVER, 'HTTP_ACCEPT', '') == 'application/jrd+json') {
                        $mode = 'json';
@@ -19,6 +23,10 @@ function xrd_init(App $a)
                        $mode = 'xml';
                }
        } else {
+               if (empty($_GET['resource'])) {
+                       killme();
+               }
+
                $uri = urldecode(notags(trim($_GET['resource'])));
                if (defaults($_SERVER, 'HTTP_ACCEPT', '') == 'application/xrd+xml') {
                        $mode = 'xml';