Tighten profile restriction feature
- Prevent feed access to restricted profiles - Rework display of restricted profiles with a redirect to the profile/restricted route - Normalize permission checking with IHandleUserSession->isAuthenticated - Remove unusable "nocache" parameter in feed module because session isn't initialized - Reword setting name and description
This commit is contained in:
@@ -29,6 +29,7 @@ use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Protocol\ActivityPub;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
@@ -74,7 +75,9 @@ class Objects extends BaseModule
|
||||
throw new HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
$validated = in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]);
|
||||
$owner = User::getById($item['uid'], ['hidewall']);
|
||||
|
||||
$validated = empty($owner['hidewall']) && in_array($item['private'], [Item::PUBLIC, Item::UNLISTED]);
|
||||
|
||||
if (!$validated) {
|
||||
$requester = HTTPSignature::getSigner('', $_SERVER);
|
||||
|
||||
Reference in New Issue
Block a user