Commit graph

2 commits

Author SHA1 Message Date
Shelley Vohr
49096c2359
fix: throw on invalid webRequest filters (#19337)
Closes #11371.

Previously, we didn't consider the return value of the webRequest URLPattern mate converter, which meant that when the pattern wasn't correctly parsed owing to invalid filter specification users would not be made aware of that fact and would just think that the filtering itself had failed. This corrects that error by moving the business logic of url pattern parsing out of the converter and into the function itself so that granular and specific errors can be thrown.

There's also no real reason that i'm aware of not to allow wider breadth of filters by letting users use a wildcard for effective TLD, so I also overrode that (default for the 1-arg Parse is not to allow that).

Finally, I added some examples of url filter types for users to reference.
2019-07-25 10:20:02 -07:00
Jeremy Apthorp
7b26048d9e
test: unflake some net specs (#18782) 2019-06-14 16:26:07 -07:00