From: Hypolite Petovan Date: Tue, 17 Aug 2021 13:06:28 +0000 (-0400) Subject: Abort early if owner isn't found in mod/photos X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=891c0ff130c9f3757d6fb41f56d8aed476d4cd59;p=friendica.git Abort early if owner isn't found in mod/photos - Address https://github.com/friendica/friendica/issues/10473#issuecomment-894779649 --- 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']));