Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEC-2159: OpenIDAuthenticationFilter.buildReturnToUrl() should call response.encodeUrl() #2385

Open
spring-projects-issues opened this issue Apr 17, 2013 · 0 comments
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement type: jira An issue that was migrated from JIRA

Comments

@spring-projects-issues
Copy link

Janning Vygen (Migrated from SEC-2159) said:

protected String buildReturnToUrl(HttpServletRequest request)
{
...
return sb.toString();
}

should be

protected String buildReturnToUrl(HttpServletRequest request, HttpServletResponse response)
{
private encodeReturnToUrl = false;
...
if (encodeReturnToUrl) {
return response.encodeRedirectUrl(sb.toString());
}
return sb.toString();
}

This way the usual rules about outbound urls apply. In our case we have an OutboundRewriteRule which rewrites all urls.

For backwards compatibility a property "encodeReturnToUrl" should be added which is false by default

@spring-projects-issues spring-projects-issues added in: core An issue in spring-security-core Open type: enhancement A general enhancement type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@rwinch rwinch removed the Open label May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

2 participants