[libsoup/gnome-2-28] [SoupAuthDomainDigest] fix nc parsing



commit 190601b0f3443d0a9b923acd57111eb6c945246a
Author: Dan Winship <danw gnome org>
Date:   Mon Nov 30 11:40:39 2009 -0500

    [SoupAuthDomainDigest] fix nc parsing
    
    We were parsing it as decimal rather than hex, which meant the auth
    would fail and return 401 again after 10 requests.
    
    Noted by Chris Head,
    https://bugzilla.gnome.org/show_bug.cgi?id=602898

 libsoup/soup-auth-domain-digest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-auth-domain-digest.c b/libsoup/soup-auth-domain-digest.c
index 509995e..e5e3164 100644
--- a/libsoup/soup-auth-domain-digest.c
+++ b/libsoup/soup-auth-domain-digest.c
@@ -303,7 +303,7 @@ check_hex_urp (SoupAuthDomain *domain, SoupMessage *msg,
 	nc = g_hash_table_lookup (params, "nc");
 	if (!nc)
 		return FALSE;
-	nonce_count = atoi (nc);
+	nonce_count = strtoul (nc, NULL, 16);
 	if (nonce_count <= 0)
 		return FALSE;
 	cnonce = g_hash_table_lookup (params, "cnonce");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]