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

Side by Side Diff: lib/filterClasses.js

Issue 29911604: Issue 7043 - Accept whitelist filters with blank CSPs (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Oct. 15, 2018, 10:16 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/filterClasses.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 if (contentType == null) 835 if (contentType == null)
836 ({contentType} = RegExpFilter.prototype); 836 ({contentType} = RegExpFilter.prototype);
837 contentType &= ~type; 837 contentType &= ~type;
838 } 838 }
839 else 839 else
840 { 840 {
841 contentType |= type; 841 contentType |= type;
842 842
843 if (type == RegExpFilter.typeMap.CSP) 843 if (type == RegExpFilter.typeMap.CSP)
844 { 844 {
845 if (!value) 845 if (blocking && !value)
846 return new InvalidFilter(origText, "filter_invalid_csp"); 846 return new InvalidFilter(origText, "filter_invalid_csp");
847 csp = value; 847 csp = value;
848 } 848 }
849 } 849 }
850 } 850 }
851 else 851 else
852 { 852 {
853 switch (option.toLowerCase()) 853 switch (option.toLowerCase())
854 { 854 {
855 case "match-case": 855 case "match-case":
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 1237
1238 /** 1238 /**
1239 * Script that should be executed 1239 * Script that should be executed
1240 * @type {string} 1240 * @type {string}
1241 */ 1241 */
1242 get script() 1242 get script()
1243 { 1243 {
1244 return this.body; 1244 return this.body;
1245 } 1245 }
1246 }); 1246 });
OLDNEW
« 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