From 45cc8180b18228b7cdb441411df77d49a0f68fdd Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sat, 23 Feb 2019 10:10:33 +0100 Subject: [PATCH] Return 404 if nodeinfo isn't enabled. --- mod/nodeinfo.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/nodeinfo.php b/mod/nodeinfo.php index 39f430f92..da9dbb87c 100644 --- a/mod/nodeinfo.php +++ b/mod/nodeinfo.php @@ -12,7 +12,12 @@ use Friendica\Core\Logger; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Util\Network; + function nodeinfo_wellknown(App $a) { + if (!Config::get('system', 'nodeinfo')) { + System::httpExit(404); + } + $nodeinfo = ['links' => [['rel' => 'http://nodeinfo.diaspora.software/ns/schema/1.0', 'href' => System::baseUrl().'/nodeinfo/1.0']]];