]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #5901 from annando/catch-error
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 13 Oct 2018 14:52:18 +0000 (10:52 -0400)
committerGitHub <noreply@github.com>
Sat, 13 Oct 2018 14:52:18 +0000 (10:52 -0400)
Catching error when compacting doesn't work

index.php
mod/xrd.php

index 7ec3485d84a6dff6362c7502abbbc4f2d4022a8b..dc3dc80f60399111c24141ce2e472c120f67702e 100644 (file)
--- a/index.php
+++ b/index.php
@@ -46,6 +46,10 @@ if ($a->isMaxProcessesReached() || $a->isMaxLoadReached()) {
        System::httpExit(503, ['title' => 'Error 503 - Service Temporarily Unavailable', 'description' => 'System is currently overloaded. Please try again later.']);
 }
 
+if (strstr($a->query_string, '.well-known/host-meta') and ($a->query_string != '.well-known/host-meta')) {
+       System::httpExit(404);
+}
+
 if (!$a->getMode()->isInstall()) {
        if (Config::get('system', 'force_ssl') && ($a->getScheme() == "http")
                && (intval(Config::get('system', 'ssl_policy')) == SSL_POLICY_FULL)
index 2626b0c791a1d156b7a913808bf9d7ba09d1b1ae..1d29d7904a9d5705e77deac205f0dbfc0fdb2cde 100644 (file)
@@ -13,7 +13,7 @@ function xrd_init(App $a)
 {
        if ($a->argv[0] == 'xrd') {
                if (empty($_GET['uri'])) {
-                       killme();
+                       System::httpExit(404);
                }
 
                $uri = urldecode(notags(trim($_GET['uri'])));
@@ -24,7 +24,7 @@ function xrd_init(App $a)
                }
        } else {
                if (empty($_GET['resource'])) {
-                       killme();
+                       System::httpExit(404);
                }
 
                $uri = urldecode(notags(trim($_GET['resource'])));
@@ -48,7 +48,7 @@ function xrd_init(App $a)
 
        $user = DBA::selectFirst('user', [], ['nickname' => $name]);
        if (!DBA::isResult($user)) {
-               killme();
+               System::httpExit(404);
        }
 
        $profile_url = System::baseUrl().'/profile/'.$user['nickname'];