eucalyptus/eucaconsole — pull request #419 by kamalgill (2014-03-19 22:35:09+00:00)
Title: GUI-274: Prevent arbitrary redirects in login handler via sanitize_url method

When the "came_from" param includes an extra slash in the scheme (e.g. http://localhost/login?came_from=http:///www.example.com), the url parser sets the path to /www.example.com as expected. Safari does the right thing by redirecting to http://localhost/www.example.com. However, Chrome, Firefox (and possibly others) will redirect to http://www.example.com, meaning those browsers ignore the location in the 302 response header and insist on redirecting to the new site. Really unfortunate, but this pull requests properly sanitizes the came_from URL to handle that case.