summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-05-24 20:14:44 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-05-24 20:14:44 -0400
commitca9e6a4fa9d075bc9cce68b7fb44a7f1bcf3f8c7 (patch)
treeba5878e5f6cf7eaa6ee82d098e6757e4211a91ee /dom
parente24e6346b70d3d212e9c9b7aa14f79f1d3ea86e8 (diff)
downloadUXP-ca9e6a4fa9d075bc9cce68b7fb44a7f1bcf3f8c7.tar
UXP-ca9e6a4fa9d075bc9cce68b7fb44a7f1bcf3f8c7.tar.gz
UXP-ca9e6a4fa9d075bc9cce68b7fb44a7f1bcf3f8c7.tar.lz
UXP-ca9e6a4fa9d075bc9cce68b7fb44a7f1bcf3f8c7.tar.xz
UXP-ca9e6a4fa9d075bc9cce68b7fb44a7f1bcf3f8c7.zip
Issue #1102 - Disable <meta http-equiv=set-cookie>
Create a new pref 'dom.meta-set-cookie.enabled' which is set to 'false', disabling http-equiv meta cookies.
Diffstat (limited to 'dom')
-rw-r--r--dom/base/nsContentSink.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/dom/base/nsContentSink.cpp b/dom/base/nsContentSink.cpp
index 85b3d07bf..490f0ec17 100644
--- a/dom/base/nsContentSink.cpp
+++ b/dom/base/nsContentSink.cpp
@@ -304,7 +304,8 @@ nsContentSink::ProcessHeaderData(nsIAtom* aHeader, const nsAString& aValue,
mDocument->SetHeaderData(aHeader, aValue);
- if (aHeader == nsGkAtoms::setcookie) {
+ if (aHeader == nsGkAtoms::setcookie &&
+ Preferences::GetBool("dom.meta-set-cookie.enabled", true)) {
// Don't allow setting cookies in cookie-averse documents.
if (mDocument->IsCookieAverse()) {
return NS_OK;