Handle missing base64 challenge in NegotiateAuth and NTLMAuth.
parent
cbdf8d0622
commit
157b45b3bb
|
@ -530,8 +530,11 @@ nsHttpNegotiateAuth::GenerateCredentials(nsIHttpAuthenticableChannel *authChanne
|
|||
challenge++;
|
||||
len = strlen(challenge);
|
||||
|
||||
if (!len)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
// strip off any padding (see bug 230351)
|
||||
while (challenge[len - 1] == '=')
|
||||
while (len && challenge[len - 1] == '=')
|
||||
len--;
|
||||
|
||||
//
|
||||
|
|
|
@ -486,8 +486,8 @@ nsHttpNTLMAuth::GenerateCredentials(nsIHttpAuthenticableChannel *authChannel,
|
|||
len -= 5;
|
||||
|
||||
// strip off any padding (see bug 230351)
|
||||
while (challenge[len - 1] == '=')
|
||||
len--;
|
||||
while (len && challenge[len - 1] == '=')
|
||||
len--;
|
||||
|
||||
// decode into the input secbuffer
|
||||
rv = Base64Decode(challenge, len, (char**)&inBuf, &inBufLen);
|
||||
|
|
Loading…
Reference in New Issue