Prevent everyone from changing the comment of the group owner

The vulnerability was there even before my commits, but I did not notice it :3
This commit is contained in:
Maxim Leshchenko 2021-11-09 14:37:30 +02:00
parent 4958988f43
commit e875a54d7b

View file

@ -124,7 +124,7 @@ final class GroupPresenter extends OpenVKPresenter
if(!$user || !$club)
$this->notFound();
if(!$club->canBeModifiedBy($this->user->identity ?? NULL) && $club->getOwner()->getId() !== $user->getId())
if(!$club->canBeModifiedBy($this->user->identity ?? NULL))
$this->flashFail("err", "Ошибка доступа", "У вас недостаточно прав, чтобы изменять этот ресурс.");
if(!is_null($hidden)) {