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; |