-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | maybe |
RFC? | no |
Symfony version | latest |
I am creating a Laravel wrapper around @aidantwoods SecureHeaders package and am experiencing an issue with using Symfony\Component\HttpFoundation\ResponseHeaderBag::set()
with a cookie.
The cookie I am trying to set has the attribute SameSite=Lax
which comes from Aidan's package, which I then attempt to set but get the following InvalidArgumentException
:
The "sameSite" parameter value is not valid.
This is because the check (
if (!in_array($sameSite, array(self::SAMESITE_LAX, self::SAMESITE_STRICT, null), true)) { |
Cookie::SAMESITE_LAX
and Cookie::SAMESITE_STRICT
constants which are both lowercase.
My suggestion would be to change this check to match case insensitively, but not sure how much of a breaking change this would be.
Would gladly submit a pull request for this!