Issue 8371: Improvements for picture permissions

This commit is contained in:
Michael 2020-03-08 13:16:59 +00:00
parent 95bfc094e8
commit 37376fa715
8 changed files with 54 additions and 15 deletions

View file

@ -84,13 +84,13 @@ class Photo extends BaseModule
}
$photo = MPhoto::getPhoto($photoid, $scale);
if ($photo === false) {
$photo = MPhoto::createPhotoForSystemResource("images/nosign.jpg");
throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('The Photo with id %s is not available.', $photoid));
}
break;
}
if ($photo === false) {
System::httpExit('404', 'Not Found');
throw new \Friendica\Network\HTTPException\NotFoundException();
}
$cacheable = ($photo["allow_cid"] . $photo["allow_gid"] . $photo["deny_cid"] . $photo["deny_gid"] === "") && (isset($photo["cacheable"]) ? $photo["cacheable"] : true);