hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27594] New: - Wrong reauthentication when using DigestAuthentication
Date Thu, 11 Mar 2004 09:11:01 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27594>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27594

Wrong reauthentication when using DigestAuthentication

           Summary: Wrong reauthentication when using DigestAuthentication
           Product: Commons
           Version: 2.0 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-httpclient-dev@jakarta.apache.org
        ReportedBy: winfried.wasser@atc.co.at


A wrong or maybe old 'nonce' will be send to the server.

Authentication fails when server returns that authentication 'nonce' value 
is 'stale'.

Quickfix:

Class: org.apache.commons.httpclient.HttpMethodBase

Method: private boolean processAuthenticationResponse(HttpState state, 
HttpConnection conn)
Line: 2486

            // FIX: for digest authentication when nonce is changed by server
            String digeststale = authscheme.getParameter("stale");
            if (digeststale != null && digeststale.equals("true")) {
              realmsUsed.remove("realm");
            }
            
            if (realmsUsed.contains(realm)) {
                if (LOG.isInfoEnabled()) {
                    buffer = new StringBuffer();
                    buffer.append("Already tried to authenticate with '");
                    buffer.append(authscheme.getRealm());
                    buffer.append("' authentication realm at ");
                    buffer.append(host);
                    buffer.append(", but still receiving: ");
                    buffer.append(statusLine.toString());
                    LOG.info(buffer.toString());
                }
                return true;
            } else {
                realmsUsed.add(realm);
            }

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


Mime
View raw message