From 891c0ff130c9f3757d6fb41f56d8aed476d4cd59 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 17 Aug 2021 09:06:28 -0400 Subject: [PATCH] Abort early if owner isn't found in mod/photos - Address https://github.com/friendica/friendica/issues/10473#issuecomment-894779649 --- mod/photos.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/photos.php b/mod/photos.php index 4512921074..bd56fbbc6a 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -65,6 +65,9 @@ function photos_init(App $a) { if (DI::args()->getArgc() > 1) { $owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]); + if (!$owner) { + throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.')); + } $is_owner = (local_user() && (local_user() == $owner['uid']));