8000 fix: throw on invalid webRequest filters by codebytere · Pull Request #19570 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: throw on invalid webRequest filters #19570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2019
Merged

Conversation

codebytere
Copy link
Member

Backport of #19337.

See that PR for more details.

Notes: Fixed error throwing on invalid webRequest url pattern filtering in onBeforeRequest.

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.
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Aug 1, 2019
@trop trop bot mentioned this pull request Aug 1, 2019
5 tasks
@codebytere codebytere requested a review from a team August 1, 2019 17:38
@codebytere codebytere added 6-0-x backport This is a backport PR and removed new-pr 🌱 PR opened recently labels Aug 1, 2019
@MarshallOfSound MarshallOfSound merged commit 75fecf4 into 6-0-x Aug 1, 2019
@release-clerk
Copy link
release-clerk bot commented Aug 1, 2019

Release Notes Persisted

Fixed error throwing on invalid webRequest url pattern filtering in onBeforeRequest.

@MarshallOfSound MarshallOfSound deleted the throw-webreq-6 branch August 1, 2019 21:03
@trop
Copy link
Contributor
trop bot commented Aug 1, 2019

I have automatically backported this PR to "5-0-x", please check out #19580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6-0-x backport This is a backport PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0