You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2013/02/14 12:26:13 UTC

[jira] [Commented] (WICKET-5036) Post Parameters are lost when continueToOriginalDestination() is called

    [ https://issues.apache.org/jira/browse/WICKET-5036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13578303#comment-13578303 ] 

Sven Meier commented on WICKET-5036:
------------------------------------

My commit is to blame for this one:

wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
diff --git a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
index cdfa766..def29ba 100644
--- a/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
+++ b/wicket-core/src/main/java/org/apache/wicket/RestartResponseAtInterceptPageException.java
@@ -143,7 +143,11 @@
 
 		public static InterceptData get()
 		{
-			return Session.get().getMetaData(key);
+			if (Session.exists())
+			{
+				return Session.get().getMetaData(key);
+			}
+			return null;
 		}
 
 		public static void clear()

I've create WICKET-5040 to find a solution to this issue.
                
> Post Parameters are lost when continueToOriginalDestination() is called
> -----------------------------------------------------------------------
>
>                 Key: WICKET-5036
>                 URL: https://issues.apache.org/jira/browse/WICKET-5036
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.5.0
>            Reporter: Steve Lowery
>         Attachments: wicket-post-problems.zip
>
>
> if a RestartResponseAtInterceptPageException() is thrown during a POST request, the InterceptData.set() method is saving off the parameters, but the call to continueToOriginalDestination() doesn't read these parameters and they get lost on the subsequent call (see lines 173-174 of RestartResponseAtInterceptPageException).
> I will attach a quickstart demoing this.  In the quickstart, I would expect the call to continueToOriginalDestination() on the EulaPage to call into the authenticate() on the session and now they should be authenticated, but that call never happens.  Instead, it goes back to the SignInPage.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira