From: Tobias Diekershoff Date: Sat, 13 Oct 2018 06:41:32 +0000 (+0200) Subject: Merge pull request #5899 from annando/avoid-flooding X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14e7686df4250169de91c4db2912b1934cc4800f;p=friendica.git Merge pull request #5899 from annando/avoid-flooding Avoid beeing flooded by invalid requests --- 14e7686df4250169de91c4db2912b1934cc4800f diff --cc index.php index 7ec3485d84,faa86575eb..dc3dc80f60 --- a/index.php +++ b/index.php @@@ -46,8 -48,12 +46,12 @@@ if ($a->isMaxProcessesReached() || $a-> 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->get_scheme() == "http") + if (Config::get('system', 'force_ssl') && ($a->getScheme() == "http") && (intval(Config::get('system', 'ssl_policy')) == SSL_POLICY_FULL) && (substr(System::baseUrl(), 0, 8) == "https://") && ($_SERVER['REQUEST_METHOD'] == 'GET')) {