Skip to content

Commit

Permalink
[ARRISEOS-43048]: Fix SameSite attribute presentation in Web Inspector
Browse files Browse the repository at this point in the history
In Web Inspector, in Network tab SameSite attribute is shown as Strict
even when attribute was set to None.

Fix is based on upstream PR:
WebKit/WebKit@644049b6feb
  • Loading branch information
Jacek Skiba authored and jacek-skiba-red committed Oct 17, 2022
1 parent 1606184 commit e15dca9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/WebInspectorUI/UserInterface/Models/Cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,19 @@ WI.Cookie = class Cookie
}
}

// Derived from <https://tools.ietf.org/html/draft-west-first-party-cookies-06#section-3.2>.
static parseSameSiteAttributeValue(attributeValue)
{
if (!attributeValue)
return WI.Cookie.SameSiteType.Strict;
return WI.Cookie.SameSiteType.None;

switch (attributeValue.toLowerCase()) {
case "lax":
return WI.Cookie.SameSiteType.Lax;
case "strict":
default:
return WI.Cookie.SameSiteType.Strict;
}

return WI.Cookie.SameSiteType.None;
}

static parseSetCookieResponseHeader(header)
Expand Down

0 comments on commit e15dca9

Please sign in to comment.