Skip to content

Commit

Permalink
ManagerBase dropped the duplicate session ID check. Drop it here too.
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed May 3, 2024
1 parent 5891f48 commit fc0aa20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
16 changes: 1 addition & 15 deletions java/org/apache/catalina/Manager.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,21 +213,7 @@ public interface Manager {
* @return The new session ID
*/
default String rotateSessionId(Session session) {
String newSessionId = null;
// Assume the new Id is a duplicate until we prove it isn't. The
// chances of a duplicate are extremely low but the current ManagerBase
// code protects against duplicates so this default method does too.
boolean duplicate = true;
do {
newSessionId = getSessionIdGenerator().generateSessionId();
try {
if (findSession(newSessionId) == null) {
duplicate = false;
}
} catch (IOException ioe) {
// Swallow. An IOE means the ID was known so continue looping
}
} while (duplicate);
String newSessionId = getSessionIdGenerator().generateSessionId();
changeSessionId(session, newSessionId);
return newSessionId;
}
Expand Down
7 changes: 6 additions & 1 deletion webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,17 @@
Add periodic checking for WebDAV locks expiration. (remm)
</fix>
<fix>
Extend <code>Asn1Parser</code> to parse <code>UTF8String</code>s. (michaelo)
Extend <code>Asn1Parser</code> to parse <code>UTF8String</code>s.
(michaelo)
</fix>
<fix>
Remove MBean metadata for attibutes that have been removed. Based on
<pr>719</pr> by Shawn Q. (markt)
</fix>
<scode>
Remove duplicate ID check from <code>Manager.rotateSessionId()</code>.
(markt)
</scode>
</changelog>
</subsection>
<subsection name="Coyote">
Expand Down

0 comments on commit fc0aa20

Please sign in to comment.