Bug 1338876 - Read ww-auth properly. r=mcmanus
authorDragana Damjanovic <dd.mozilla@gmail.com>
Wed, 15 Feb 2017 20:38:59 -0500
changeset 343233 36663347138dc227d190bdec9b469821058cf176
parent 343232 0cdc48673b0c5499003e7d7ef4f99d87ff2720b5
child 343234 ea8bf524e3c8a7bdb26a329b8effa3ba0d9e822e
push id31372
push usercbook@mozilla.com
push dateThu, 16 Feb 2017 12:16:10 +0000
treeherdermozilla-central@2737f66ad6ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs1338876
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1338876 - Read ww-auth properly. r=mcmanus
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;