From 331126916239b1ecad48faa24a8e961cffa6e69f Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 2 Nov 2022 17:52:19 +0100 Subject: throw a 404 if we could not determine which channel to load --- Zotlabs/Module/Channel.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 0874551d6..d3d72ca10 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -31,8 +31,10 @@ class Channel extends Controller { goaway(z_root() . '/search?f=&search=' . $_GET['search']); $which = null; - if (argc() > 1) + if (argc() > 1) { $which = argv(1); + } + if (!$which) { if (local_channel()) { $channel = App::get_channel(); @@ -40,9 +42,9 @@ class Channel extends Controller { $which = $channel['channel_address']; } } + if (!$which) { - notice(t('You must be logged in to see this page.') . EOL); - return; + http_status_exit(404, 'Not found'); } $profile = 0; -- cgit v1.2.3