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

Commit

Permalink
finish reviewing linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jspenguin2017 committed Apr 4, 2020
1 parent edccd44 commit cd8a536
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions locale.nano.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@
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
12 changes: 12 additions & 0 deletions patches/integration/10_6_lint_filters.patch
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,15 @@ 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;
}

0 comments on commit cd8a536

Please sign in to comment.