This is an automated email from the ASF dual-hosted git repository.

kfujino pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 7a04e62  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=64043
7a04e62 is described below

commit 7a04e624c5b88d0541d0f5d08d24f5ab05983d81
Author: KeiichiFujino <kfuj...@apache.org>
AuthorDate: Sun Jan 12 23:52:14 2020 +0900

    Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=64043
---
 java/org/apache/catalina/ha/session/DeltaManager.java | 14 +++++++++++++-
 webapps/docs/changelog.xml                            |  8 ++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ha/session/DeltaManager.java 
b/java/org/apache/catalina/ha/session/DeltaManager.java
index 21c6efa..130b158 100644
--- a/java/org/apache/catalina/ha/session/DeltaManager.java
+++ b/java/org/apache/catalina/ha/session/DeltaManager.java
@@ -490,7 +490,12 @@ public class DeltaManager extends ClusterManagerBase{
 
     @Override
     public void changeSessionId(Session session) {
-        changeSessionId(session, true);
+       rotateSessionId(session, true);
+    }
+
+    @Override
+    public String rotateSessionId(Session session) {
+        return rotateSessionId(session, true);
     }
 
     @Override
@@ -504,6 +509,13 @@ public class DeltaManager extends ClusterManagerBase{
         if (notify) sendChangeSessionId(session.getId(), orgSessionID);
     }
 
+    protected String rotateSessionId(Session session, boolean notify) {
+        String orgSessionID = session.getId();
+        String newId = super.rotateSessionId(session);
+        if (notify) sendChangeSessionId(session.getId(), orgSessionID);
+        return newId;
+    }
+
     protected void changeSessionId(Session session, String newId, boolean 
notify) {
         String orgSessionID = session.getId();
         super.changeSessionId(session, newId);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d61f780..14fc5a3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -138,6 +138,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Cluster">
+    <changelog>
+      <fix>
+        <bug>64043</bug>: Ensure that session ID changes are replicated during
+        form-authentication. (kfujino)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Other">
     <changelog>
       <fix>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to