jmuehlner commented on code in PR #846:
URL: https://github.com/apache/guacamole-client/pull/846#discussion_r1244477360


##########
extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/AuthenticationSessionManager.java:
##########
@@ -97,9 +149,21 @@ public String generateInvalid() {
      *     value was returned by defer().
      */
     public T resume(String identifier) {
-
         if (identifier != null) {
-            T session = sessions.remove(identifier);
+             T session = sessions.get(identifier);
+
+            // If this session is already pending, invalidate and return null
+            if (pendingSessions.contains(identifier)) {
+                invalidateSession(identifier);
+                return null;
+            }
+
+            // Otherwise, mark the session as pending. NOTE: Unless explicitly
+            // removed from pending status via a call to reactivateSession(),
+            // the next attempt to resume this session will fail
+            else
+                pendingSessions.add(identifier);

Review Comment:
   Oops, my bad. Yeah that's not going to work. I've updated it and this issue 
should be fixed now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to