Skip to content
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

Add $urltransform modifier support #111

Open
slavaleleka opened this issue Dec 20, 2023 · 2 comments
Open

Add $urltransform modifier support #111

slavaleleka opened this issue Dec 20, 2023 · 2 comments
Labels
Feature request Adding new feature

Comments

@slavaleleka
Copy link
Contributor

should be trusted

related: AdguardTeam/CoreLibs#1364

@slavaleleka slavaleleka added the Feature request Adding new feature label Dec 20, 2023
@ngorskikh
Copy link
Member

Please make sure that $urltransform rules can only modify the path and query part of the URL, we've already had to deal with that in CoreLibs :)
Example:

$urltransform=/\//@evil.org/

Might redirect a request to https://example.org/ to https://[email protected] if you're not careful.

@ngorskikh
Copy link
Member

And... now they want the ability to change the origin :)
But only in a very specific case:

  1. The pattern part of the rule must start with ^http, verbatim.
  2. The URL replacement must be done via an HTTP redirect, not by modifying the outbound request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Adding new feature
Projects
None yet
Development

No branches or pull requests

2 participants