Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So rare that I'm not sure why this got any attention. There are more interesting bugs to look at, which i do see in the wild a lot (e.g. redirect_to params[:return_url])


If anyone is interested, I've got a set of helper functions for redirects. https://github.com/epochwolf/litsocial/blob/master/app/lib/c...


Redirects are hard to get right. Bypass 1 - //host.com. Even if you will use URI library Bypass 2 - ///host.com


Good point, I'll need to modify the redirect to disallow multiple slashes at the beginning.

That should be something like /\A(http(s?):\/\/#{request.host_with_port}|\/\Z|\/[^\/])/


/\host.com




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: