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: Address PS3 Comment Created Aug. 24, 2018, 8:11 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 | test/filterClasses.js » ('j') | 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
@@ -774,18 +774,22 @@
if (contentType == null)
({contentType} = RegExpFilter.prototype);
contentType &= ~type;
}
else
{
contentType |= type;
- if (type == RegExpFilter.typeMap.CSP && value)
+ if (type == RegExpFilter.typeMap.CSP)
+ {
+ if (!value)
+ return new InvalidFilter(origText, "filter_invalid_csp");
csp = value;
+ }
}
}
else
{
switch (option.toLowerCase())
{
case "match-case":
matchCase = !inverse;
« no previous file with comments | « no previous file | test/filterClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld