mardi 3 mai 2016

Rails 3.0.2 unescaping get request parameter

I have 2 applications one with rails 3.0.2 and one with 4.x.x . These applications have an action named redirect_now that takes a request with some parameters and redirects the user where the redirect_to parameters points to.

A request would look something like:

0.0.0.0:3000/redirect_now?param1=lala&param2=lala&redirect_to=http%3A%2F%2Fwww.germanos.ro%2Fapp%2Fsearch.do%3Faction%3DExecute%26searchString%3Dtelevizor%2Bsamsung%26x%3D0%26y%3D0

This request works fine in the 4.x.x rails app however in the 3.x.x rails app when I type request.url I get:
http://ift.tt/1W4tGL2" which obviously leads rails into thinking that there are 3 more parameters in the url searchString x, and y instead of using those parameters in the redirect url.

There are no filters or anything that could impact the get request. Any ideas?

Aucun commentaire:

Enregistrer un commentaire