tumpio / requestcontrol

A Firefox extension
https://addons.mozilla.org/addon/requestcontrol
Mozilla Public License 2.0
173 stars 25 forks source link

Trim query params with filter URL redirection trims encoded strings within a query param #99

Closed menma1234 closed 5 years ago

menma1234 commented 5 years ago

If there's an encoded URL with query params inside a query param of a URL and filter URL redirection is enabled, trim query params seems to affect that encoded URL as well.

Expected behavior

Only the original URL should have its query params trimmed, not the redirected one, at least not from the same rule.

Actual behavior

The query params for both the original URL and the URL it redirects to is trimmed.

Steps to reproduce the problem

Example: image

With these settings, for the URL https://slickdeals.net/?adobeRef=62716f6088c511e987842211e560f7e80001&sdtid=13131712&sdop=1&sdpid=128047819&sdfid=9&sdfib=1&lno=1&trd=https%20play%20google%20com%20store%20app%20&pv=&au=&u2=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.pockettrend.neomonsters, it redirects to https://play.google.com/store/apps/details instead of the expected https://play.google.com/store/apps/details?id=com.pockettrend.neomonsters. If id is added as one of the query parameters to trim, it works as expected.

tumpio commented 5 years ago

I think I did this intentionally. But can be changed, to support your use case as well.

tumpio commented 5 years ago

Changed the trimming behavior to skip the extracted URL in 1.13.0