Ensure redirect URL is encoded

Issue: SWF-1686
This commit is contained in:
Rossen Stoyanchev
2016-06-16 17:31:56 -04:00
parent 0dc8b52c72
commit 8a177518fa

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2004-2012 the original author or authors.
* Copyright 2004-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ public class JsfAjaxHandler extends AbstractAjaxHandler {
FacesContext facesContext = helper.getFacesContext(getServletContext(), request, response);
PartialResponseWriter writer = createPartialResponseWriter(facesContext);
writer.startDocument();
writer.redirect(targetUrl);
writer.redirect(response.encodeRedirectURL(targetUrl));
writer.endDocument();
} finally {
helper.releaseIfNecessary();