Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterClasses.js

Issue 29861585: Issue 6871 - Reject filters with blank CSPs (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Aug. 22, 2018, 7:44 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterClasses.js
===================================================================
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -776,16 +776,18 @@
contentType &= ~type;
}
else
{
contentType |= type;
if (type == RegExpFilter.typeMap.CSP && value)
csp = value;
+ else if (type == RegExpFilter.typeMap.CSP && !value)
+ return new InvalidFilter(origText, "filter_invalid_csp");
}
}
else
{
switch (option.toLowerCase())
{
case "match-case":
matchCase = !inverse;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld