Bug 1338876 - Read ww-auth properly. r=mcmanus, a=jcristau
authorDragana Damjanovic <dd.mozilla@gmail.com>
Wed, 15 Feb 2017 20:38:59 -0500
changeset 376243 197dde7656f8d4b8f136233a664891ba8d0b150a
parent 376242 9ec7bed2e1e00ea8de27f16642425719d74bf4bf
child 376244 e63ed2a09e88a756d1cf267779ce2f19534c7d55
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus, jcristau
bugs1338876
milestone53.0a2
Bug 1338876 - Read ww-auth properly. r=mcmanus, a=jcristau
netwerk/protocol/http/nsHttpDigestAuth.cpp
--- a/netwerk/protocol/http/nsHttpDigestAuth.cpp
+++ b/netwerk/protocol/http/nsHttpDigestAuth.cpp
@@ -561,18 +561,18 @@ nsHttpDigestAuth::ParseChallenge(const c
                                  uint16_t * algorithm,
                                  uint16_t * qop)
 {
   // put an absurd, but maximum, length cap on the challenge so
   // that calculations are 32 bit safe
   if (strlen(challenge) > 16000000) {
     return NS_ERROR_INVALID_ARG;
   }
-  
-  const char *p = challenge + 7; // first 7 characters are "Digest "
+
+  const char *p = challenge + 6; // first 6 characters are "Digest"
 
   *stale = false;
   *algorithm = ALGO_MD5; // default is MD5
   *qop = 0;
 
   for (;;) {
     while (*p && (*p == ',' || nsCRT::IsAsciiSpace(*p)))
       ++p;