Closed
Bug 395217
Opened 18 years ago
Closed 18 years ago
uninitialized variable in nsHttpNTLMAuth::ChallengeReceived - intermittent sys-ntlm authentication failure
Categories
(Firefox :: Shell Integration, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: laurenz.albe, Unassigned)
Details
Attachments
(1 file)
|
22.22 KB,
text/plain
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9
I am experiencing intermittent NTLM authentication problems with Firefox 1.5.0.9 and 2.0.0.6.
We use squid as HTTP proxy with NTLM authentication.
network.automatic-ntlm-auth.allow-proxies is true, the proxy is in the domain wien.gv.at, and network.automatic-ntlm-auth.trusted-uris is set to ".magwien.gv.at, .wien.gv.at".
Normally things work like expected, and I can use the proxy.
Occasionally, however, I am prompted for user and password by Firefox and get the proxy's 407 page when I hit "cancel".
When I push the "reload" button, I get the page I requested without having to authenticate.
I ran a trace with NSPR_LOG_MODULES to nsHttp:5,nsSocketTransport:5.
I'll attach snippets of the log file to this bug.
Looking at the trace, I got the impression that the problem must be somewhere in nsHttpNTLMAuth::ChallengeReceived and examined the source code.
In line 229 of mozilla/netwerk/protocol/http/src/nsHttpNTLMAuth.cpp in seamonkey an automatic variable is declared, but not initialized:
nsCOMPtr<nsISupports> module;
The log tells me that the *continuationState is nonzero, so the condition in line 246 becomes false and module is not assigned to in the next line.
In the query
if (!module) {
in line 255 module may still be uninitialized, which (if I didn't misinterpret the trace) could lead to the observed problem.
Reproducible: Sometimes
Steps to Reproduce:
1. request a page from https://metalink.oracle.com (after having logged in)
2. repeat step 1. until the problem occurs
Actual Results:
A popup asks me for user-ID and password. If I enter the correct user-ID and password, the page is loaded correctly. If I hit "cancel", I get the 407 page from the proxy server.
Expected Results:
Get the correct page without having to authenticate. This is what happens normally.
| Reporter | ||
Comment 1•18 years ago
|
||
There are two snippets from the log file: part of a successful attemt to get a page, and part of a failed attempt
| Reporter | ||
Updated•18 years ago
|
Version: unspecified → Trunk
| Reporter | ||
Comment 2•18 years ago
|
||
Maybe the uninitialized variable (which IS a problem) is not the immediate cause of the problem I observe:
I notice that in the error case the continuationState passed to ChallengeReceived is non-zero, although we are not in the middle of NTLM authentication.
Usually the pattern is like this:
1) A request is sent.
2) A response comes in with "Proxy-Authenticate: NTLM", continuationState is zero (visible as "cs=0" in the log entry of ChallengeReceived).
3) The request is resent with NTLMSSP NEGOTIATE.
4) A response comes in with "Proxy-Authenticate: NTLM TlRMTVN..." (NTLMSSP CHALLENGE), continuationState is nonzero
5) The request is resent with NTLMSSP AUTH.
6) Response "200 Connection established"
The problem cases differ in Step 2. A response with "Proxy-Authenticate: NTLM" comes, but continuationState is not zero.
What could cause this?
| Reporter | ||
Comment 3•18 years ago
|
||
I just read http://www.mozilla.org/projects/xpcom/nsCOMPtr.html and realize that the variable IS initialized.
I will close the bug because it is a mess.
I'll have to dig deeper - when I find the cause of the problem I experience, I will open a new bug.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•