Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
resync
Browse files Browse the repository at this point in the history
  • Loading branch information
jspenguin2017 committed Apr 4, 2020
1 parent cd8a536 commit dfe0244
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
22 changes: 9 additions & 13 deletions patches/integration/10_6_lint_filters.patch
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ index 1c2aab1a..c766abbe 100644
}

diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js
index bc511f72..5da925d2 100644
index bc511f72..75372ee4 100644
--- a/src/js/static-net-filtering.js
+++ b/src/js/static-net-filtering.js
@@ -2287,6 +2287,7 @@ const FilterParser = class {
Expand Down Expand Up @@ -378,6 +378,14 @@ index bc511f72..5da925d2 100644
}

// https://github.com/gorhill/uBlock/issues/1047
@@ -2567,6 +2593,7 @@ const FilterParser = class {

if ( s.length > 1024 ) {
this.unsupported = true;
+ nano.flinte('nano_l_filter_matcher_too_long');
return this;
}

diff --git a/src/js/storage.js b/src/js/storage.js
index 92f6fb2c..e21a9f34 100644
--- a/src/js/storage.js
Expand Down Expand Up @@ -467,15 +475,3 @@ index 92f6fb2c..e21a9f34 100644
nano.cf.reset();

return writer.toString();
diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js
index 5da925d2..75372ee4 100644
--- a/src/js/static-net-filtering.js
+++ b/src/js/static-net-filtering.js
@@ -2593,6 +2593,7 @@ const FilterParser = class {

if ( s.length > 1024 ) {
this.unsupported = true;
+ nano.flinte('nano_l_filter_matcher_too_long');
return this;
}

12 changes: 12 additions & 0 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
"message": "'{{alias}}' is the alias of '{{res}}', consider using the real name instead.",
"description": "Warning when resource alias used"
},
"nano_l_html_filtering": {
"message": "HTML filtering is not supported by your browser",
"description": "Warning when HTML filtering used"
},
"nano_l_filter_comment_bracket": {
"message": "Using '[' to denote comment is deprecated, use '!' instead.",
"description": "Deprecation when '[' used for comments"
Expand Down Expand Up @@ -179,6 +183,10 @@
"message": "The option 'domain=...' has invalid arguments.",
"description": "Error when 'domain=' has invalid arguments"
},
"nano_l_filter_bad_denyallow_option_arguments": {
"message": "The option 'denyallow=...' has invalid arguments.",
"description": "Error when 'denyallow=' has invalid arguments"
},
"nano_l_filter_bad_csp_option_arguments": {
"message": "The option 'csp=...' has no arguments or has invalid arguments.",
"description": "Error when 'csp=' has no arguments or has invalid arguments"
Expand All @@ -203,6 +211,10 @@
"message": "This network rule is too short.",
"description": "Error when network rule is too short"
},
"nano_l_filter_matcher_too_long": {
"message": "The matcher of this network rule is too long.",
"description": "Error when network matcher is too long"
},
"nano_l_filter_generic_js_in_block": {
"message": "Script injection syntax that selects all resources can only be used in exception filters.",
"description": "Error when '##+js()' is used"
Expand Down

0 comments on commit dfe0244

Please sign in to comment.