Bug 1454781 - SameSite policy logged in the console - part 3 - log invalid sameSite values, r=Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D65315

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrea Marchesini 2020-03-05 03:41:50 +00:00
Родитель 3d32ec99d9
Коммит 371649e01e
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -3861,6 +3861,10 @@ bool nsCookieService::ParseAttributes(nsIChannel* aChannel, nsIURI* aHostURI,
aCookieData.sameSite() = nsICookie::SAMESITE_NONE;
aCookieData.rawSameSite() = nsICookie::SAMESITE_NONE;
sameSiteSet = true;
} else {
LogMessageToConsole(aChannel, aHostURI,
NS_LITERAL_CSTRING("CookieSameSiteValueInvalid"),
aCookieData.name());
}
}
}

Просмотреть файл

@ -53,3 +53,5 @@ CookieAllowedForTrackerByHeuristic=Storage access automatically granted for trac
CookieRejectedNonRequiresSecure=Cookie “%1$S” rejected because it has the “sameSite=none” attribute but is missing the “secure” attribute.
# LOCALIZATION NOTE(CookieLaxForced): %1$S is the cookie name. Do not localize "sameSite", "lax" and "sameSite=lax".
CookieLaxForced=Cookie “%1$S” has “sameSite” policy set to “lax” because it is missing a “sameSite” attribute, and “sameSite=lax” is the default value for this attribute.
# LOCALIZATION NOTE: %1$S is cookie name. Do not localize "sameSite", "lax", "strict" and "none"
CookieSameSiteValueInvalid=Invalid “sameSite“ value for cookie “%1$S”. The supported values are: “lax“, “strict“, “none“.