You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/05/21 21:50:48 UTC

[Bug 54999] New: JSESSIONIDSSO not re-created upon re-authentication via logout() and login(username,password) in the same request

https://issues.apache.org/bugzilla/show_bug.cgi?id=54999

            Bug ID: 54999
           Summary: JSESSIONIDSSO not re-created upon re-authentication
                    via logout() and login(username,password) in the same
                    request
           Product: Tomcat 7
           Version: 7.0.40
          Hardware: PC
                OS: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: kmashint@yahoo.com
    Classification: Unclassified

In testing I found that the JSESSIONIDSSO was not re-created upon
re-authentication via logout() and login(username,password) in the same
request.  The problem stemmed from the REQ_SSOID_NOTE that was was not reset
upon request.logout(), whereas the documentation indicates that a logout() from
any web-app should logout() from all web-apps.  When the REQ_SSOID_NOTE is not
removed upon logout(), a subsequent login(username,password) on the same
request will re-create a JSESSIONID for the current web-app but fails to
re-create a JSESSIONIDSSO since the REQ_SSO_ID_NOTE still lingers on the
request.

AuthenticatorBase.java adjustment for logout(request) that removes the
REQ_SSOID_NOTE so that a subsequent login(username,password) will work on the
same request:

    @Override
    public void logout(Request request) throws ServletException {
        register(request, request.getResponse(), null,
                null, null, null);
        request.removeNote(Constants.REQ_SSOID_NOTE);
    }

I'll upload a diff-patch against the trunk and for 7.0.40.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 54999] JSESSIONIDSSO not re-created upon re-authentication on the same request - logout() and login(username,password)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54999

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Mark Thomas <ma...@apache.org> ---
Thanks for the report, analysis and patch. It all looks good to me.

I have applied the patch to trunk and 7.0.x and the fix will be included in
7.0.41 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 54999] JSESSIONIDSSO not re-created upon re-authentication on the same request - logout() and login(username,password)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54999

Keith Mashinter <km...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|JSESSIONIDSSO not           |JSESSIONIDSSO not
                   |re-created upon             |re-created upon
                   |re-authentication via       |re-authentication on the
                   |logout() and                |same request - logout() and
                   |login(username,password) in |login(username,password)
                   |the same request            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 54999] JSESSIONIDSSO not re-created upon re-authentication on the same request - logout() and login(username,password)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54999

--- Comment #1 from Keith Mashinter <km...@yahoo.com> ---
Created attachment 30313
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30313&action=edit
Fix for Bug 54999 to ensure JSESSIONIDSSO can be re-created

In the Bug comments I chose to @override the AuthenticatorBase logout(Request) 
but the more self-consistent place to patch this seems to be in
AuthenticatorBase.register(Request,...) that I've done here against the
tc7.0.x/trunk/tc7.0.x/java/org/apache/catalina/authenticator/AuthenticatorBase.java.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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