[sipxtapi] r1409 committed - Fixed bug introduced some time ago with stale=true handling in authent...

1 view
Skip to first unread message

codesite...@google.com

unread,
Nov 29, 2010, 5:16:51 PM11/29/10
to sipxtapi...@googlegroups.com
Revision: 1409
Author: jaroslavl1
Date: Mon Nov 29 14:16:33 2010
Log: Fixed bug introduced some time ago with stale=true handling in
authentication. When stale=true, we don't care if we tried to authenticate
before. Otherwise we attempt it only twice. This prevents repeated
authentication attempts when credentials are wrong.
http://code.google.com/p/sipxtapi/source/detail?r=1409

Modified:
/trunk/sipXtackLib/src/net/SipUserAgent.cpp

=======================================
--- /trunk/sipXtackLib/src/net/SipUserAgent.cpp Wed Feb 24 14:21:43 2010
+++ /trunk/sipXtackLib/src/net/SipUserAgent.cpp Mon Nov 29 14:16:33 2010
@@ -4007,9 +4007,10 @@
// According to RFC2617: "The server should only set stale to TRUE
// if it receives a request for which the nonce is invalid but with a
// valid digest for that nonce" - so there shouldn't be infinite
auth loop
- if (stale.compareTo("TRUE", UtlString::ignoreCase) == 0)
+ if (stale.compareTo("TRUE", UtlString::ignoreCase) != 0)
{
// Check to see if we already tried to send the credentials
+ // if stale=true is present, we always act as if we never tried
to authenticate
alreadyTriedOnce = request.hasDigestAuthorizationData(realm,
authorizationEntity);
}

Reply all
Reply to author
Forward
0 new messages