Bug 535193 - DNS resolution in MakeSN of nsAuthSSPI causing issues for proxy servers that support NTLM auth. r=bz, a=dveditz
git-svn-id: svn://10.0.0.236/trunk@259259 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ac26d11851
commit
f17d4b1ec0
@ -246,9 +246,24 @@ nsAuthSSPI::Init(const char *serviceName,
|
||||
SEC_CHAR *package;
|
||||
|
||||
package = (SEC_CHAR *) pTypeName[(int)mPackage];
|
||||
|
||||
if (mPackage == PACKAGE_TYPE_NTLM) {
|
||||
// (bug 535193) For NTLM, just use the uri host, do not do canonical host lookups.
|
||||
// The incoming serviceName is in the format: "protocol@hostname", SSPI expects
|
||||
// "<service class>/<hostname>", so swap the '@' for a '/'.
|
||||
mServiceName.Assign(serviceName);
|
||||
PRInt32 index = mServiceName.FindChar('@');
|
||||
if (index == kNotFound)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
mServiceName.Replace(index, 1, '/');
|
||||
}
|
||||
else {
|
||||
// Kerberos requires the canonical host, MakeSN takes care of this through a
|
||||
// DNS lookup.
|
||||
rv = MakeSN(serviceName, mServiceName);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
}
|
||||
|
||||
mServiceFlags = serviceFlags;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user