From: Hypolite Petovan Date: Fri, 5 Jun 2020 18:28:11 +0000 (-0400) Subject: Exit with an error if profile info isn't available in Module\NoScrape X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1304e145726232376b8f4b7d0a8780e15cbfeb45;p=friendica.git Exit with an error if profile info isn't available in Module\NoScrape --- diff --git a/src/Module/NoScrape.php b/src/Module/NoScrape.php index 13a683d974..1457a1125f 100644 --- a/src/Module/NoScrape.php +++ b/src/Module/NoScrape.php @@ -46,14 +46,17 @@ class NoScrape extends BaseModule $which = $parameters['nick']; } elseif (local_user() && isset($parameters['profile']) && DI::args()->get(2) == 'view') { // view infos about a known profile (needs a login) - $which = $a->user['nickname']; + $which = $a->user['nickname']; } else { System::jsonError(403, 'Authentication required'); - exit(); } Profile::load($a, $which); + if (empty($a->profile['uid'])) { + System::jsonError(404, 'Profile not found'); + } + $json_info = [ 'addr' => $a->profile['addr'], 'nick' => $which,