deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject deltaspike git commit: DELTASPIKE-880 Restrict initial redirect to GET requests
Date Tue, 28 Apr 2015 19:14:42 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 5ba888273 -> 4f7808b67


DELTASPIKE-880 Restrict initial redirect to GET requests

Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/4f7808b6
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/4f7808b6
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/4f7808b6

Branch: refs/heads/master
Commit: 4f7808b6702367711fb03ac147db96ea36e2c3ad
Parents: 5ba8882
Author: Thomas Andraschko <tandraschko@apache.org>
Authored: Tue Apr 28 21:14:31 2015 +0200
Committer: Thomas Andraschko <tandraschko@apache.org>
Committed: Tue Apr 28 21:14:31 2015 +0200

----------------------------------------------------------------------
 .../deltaspike/jsf/impl/scope/window/DefaultClientWindow.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/4f7808b6/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java
b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java
index 1fa61f6..7ba8c97 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/scope/window/DefaultClientWindow.java
@@ -158,9 +158,14 @@ public class DefaultClientWindow implements ClientWindow
                 windowId = externalContext.getRequestParameterMap().get(DELTASPIKE_WINDOW_ID_URL_PARAM);
             }
 
+            if (StringUtils.isEmpty(windowId) && facesContext.isPostback())
+            {
+                windowId = getPostBackWindowId(facesContext);
+            }
+            
             if (StringUtils.isEmpty(windowId))
             {
-                if (this.jsfModuleConfig.isInitialRedirectEnabled())
+                if (this.jsfModuleConfig.isInitialRedirectEnabled() && !facesContext.isPostback())
                 {
                     ClientWindowHelper.handleInitialRedirect(facesContext, generateNewWindowId());
                     facesContext.responseComplete();


Mime
View raw message