I was reading An Insiders Guide to Security Review and on page 17, point 10 noticed something called Unvalidated Redirects and Forwards.
The jist here is that user might be redirected to malicious site by trusting your site.
I noticed that Site.Login() method takes in StartURL parameter. Currently project implemented this way:
String startUrl = System.currentPageReference().getParameters().get('startURL'); pagereference Attempt = Site.login(u.username, password, startUrl);
I was wondering if there is a valid attack vector here. What would be viable exploit and what are the ways to validate?