cookieReader = $cookieReader; $this->serializer = $serializer; } /** * @inheritDoc */ public function execute(): array { $consent = $this->cookieReader->getCookie(self::COOKIE_CONSENT_NAME); if (null === $consent) { throw new NotFoundException(__('User didnt make any consents.')); } /** * todo: remove in 2022 * * Previously we used "*" for "all categories" but cookie with this value is blocked by mod security * @see REQUEST-942-APPLICATION-ATTACK-SQLI */ $consent = str_replace('*', CategoryInterface::ALL_CATEGORIES, $consent); return $this->serializer->unserialize($consent); } }