From 8a177518fae8826840edb9af9939928b3ff291a7 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 16 Jun 2016 17:31:56 -0400 Subject: [PATCH] Ensure redirect URL is encoded Issue: SWF-1686 --- .../org/springframework/faces/webflow/JsfAjaxHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java index fcaf06a3..f3430a4a 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfAjaxHandler.java @@ -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();