Add missing CSRF checks

This commit is contained in:
Frédéric Guillot
2021-06-05 14:33:19 -07:00
committed by fguillot
parent 41102ec161
commit 71123b0f37
23 changed files with 58 additions and 17 deletions

View File

@@ -34,6 +34,7 @@ class WebNotificationController extends BaseController
*/
public function flush()
{
$this->checkReusableGETCSRFParam();
$userId = $this->getUserId();
$this->userUnreadNotificationModel->markAllAsRead($userId);
$this->show();
@@ -46,6 +47,7 @@ class WebNotificationController extends BaseController
*/
public function remove()
{
$this->checkReusableGETCSRFParam();
$user_id = $this->getUserId();
$notification_id = $this->request->getIntegerParam('notification_id');
$this->userUnreadNotificationModel->markAsRead($user_id, $notification_id);