]> git.mxchange.org Git - friendica.git/blobdiff - mod/xrd.php
Fix introductions notifications links
[friendica.git] / mod / xrd.php
index b5c1b4c11523cef1facc9825de8b3c2c7fa3e398..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';
@@ -39,7 +47,7 @@ function xrd_init(App $a)
        }
 
        $user = DBA::selectFirst('user', [], ['nickname' => $name]);
-       if (!DBA::is_result($user)) {
+       if (!DBA::isResult($user)) {
                killme();
        }