processwire / processwire-requests

ProcessWire feature requests.
40 stars 0 forks source link

PagePathHistory.module: Option to allow redirects with QueryStrings #59

Open flipzoom opened 7 years ago

flipzoom commented 7 years ago

Short description of the enhancement

An option should be available in the PagePathHistory module, which allows the QueryString to be passed on to the Redirect (see problem case). As the icing on the cake, you could decide for yourself which QueryString paramaters are allowed instead of allowing all.

Problem case: https://github.com/processwire/processwire-issues/issues/77

Why would the enhancement be useful to users?

If pages require or use QueryStrings, for example as a filter on the page and the path of the page changes, all old links are not redirected correctly. This is an SEO problem and an annoyance for the visitor.

teppokoivula commented 7 years ago

For the record, I think this request makes a lot of sense. After reading Ryan's comment in the original issue report I'm a bit curious, though, what kind of vulnerabilities could keeping the GET params as-is result in? I'm not aware of any, but that obviously doesn't mean that none exist :)

That being said, a whitelist option (regex, param, param=value, *, etc.) could be a good addition either way.

Note: the issue link above seems to be broken.

flipzoom commented 7 years ago

Thank you Teppo, I've changed the link.