The login form return_to param should only accept relative urls, and not external urls. An easy check is that '//' is not in the return_to URL (it matches protocol-less urls too).
This will prevent phishing sites from taking advantage the login flow to present a malicious page.
allura:cj/7545
I went with a slightly more complex approach, to allow for, e.g.,
http://sourceforge.net/foo
return_to URLs to work.