This is an automated email from the ASF dual-hosted git repository. reiern70 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/wicket.git
commit 4202d57389903d7b6f468b511de673e94956a104 Author: reiern70 <[email protected]> AuthorDate: Sat Sep 12 14:08:20 2026 -0500 Invalidate the session immediately when signing out of the examples SignOut's constructor called Session#invalidate(), which only flags the session: the page still rendered and was stored under a stateful page id (SignOut?4). At the end of that request Session#endRequest() honoured the flag by calling invalidateNow(), clearing the page store - and with it the instance just stored under that id. The next request to the now-dangling URL found nothing, so the page was re-created at the bare SignOut URL and the whole cycle repeated. The examples build failed on it; Signin2Test walks exactly this path, signing in, hitting SignOut and expecting Home to bounce back to the sign-in page. Session#invalidateNow() invalidates before the page is rendered and stored, so the id in its URL still resolves on the next request. GitHub issue #1582: https://github.com/apache/wicket/issues/1582 --- .../main/java/org/apache/wicket/examples/authentication2/SignOut.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/authentication2/SignOut.java b/wicket-examples/src/main/java/org/apache/wicket/examples/authentication2/SignOut.java index c2468bf451..eb68949cdd 100644 --- a/wicket-examples/src/main/java/org/apache/wicket/examples/authentication2/SignOut.java +++ b/wicket-examples/src/main/java/org/apache/wicket/examples/authentication2/SignOut.java @@ -30,6 +30,6 @@ public class SignOut extends WicketExamplePage */ public SignOut() { - getSession().invalidate(); + getSession().invalidateNow(); } }
