Bug 1338876 - Read ww-auth properly. r=mcmanus
authorDragana Damjanovic <dd.mozilla@gmail.com>
Wed, 15 Feb 2017 20:38:59 -0500
changeset 389875 36663347138dc227d190bdec9b469821058cf176
parent 389874 0cdc48673b0c5499003e7d7ef4f99d87ff2720b5
child 389876 ea8bf524e3c8a7bdb26a329b8effa3ba0d9e822e
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [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;