mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Implement "cookie-averse document objects".
See: https://html.spec.whatwg.org/multipage/dom.html#cookie-averse-document-object This resolves #196.
This commit is contained in:
parent
4923ad3b10
commit
3df0152d88
3 changed files with 43 additions and 0 deletions
|
|
@ -305,6 +305,11 @@ nsContentSink::ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue,
|
|||
mDocument->SetHeaderData(aHeader, aValue);
|
||||
|
||||
if (aHeader == nsGkAtoms::setcookie) {
|
||||
// Don't allow setting cookies in cookie-averse documents.
|
||||
if (mDocument->IsCookieAverse()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Note: Necko already handles cookies set via the channel. We can't just
|
||||
// call SetCookie on the channel because we want to do some security checks
|
||||
// here.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue