Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Lock icon appears even though http connection failed.

VERIFIED FIXED in mozilla1.8beta1



Networking: HTTP
13 years ago
12 years ago


(Reporter: dougt, Assigned: Darin Fisher)


(Blocks: 1 bug, {fixed-aviary1.0.1, fixed1.7.6})

fixed-aviary1.0.1, fixed1.7.6
Dependency tree / graph
Bug Flags:
blocking1.7.6 +
blocking-aviary1.0.1 +

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [sg:fix], URL)


(3 attachments)



13 years ago
steps to reproduce:

1.  Go to
2.  Go to a https server that doesn't speak https.  For example, a https imap

expected result:

an error dialog and the content of the page shouldn't change.  most importantly,
the security of the page should remain the same -- lock icon unlocked.

actual result:

i see an error dialog, but then the lock icon is locked and the details in the
page security dialog suggest that has been verified.

marking security sensitive per conversation with darin


13 years ago
Target Milestone: --- → mozilla1.8beta
*** Bug 270676 has been marked as a duplicate of this bug. ***

Comment 2

13 years ago
I found a public secure IMAP server that can be used to demonstrate this bug:

Load that link, and then press the STOP button.  You should see the address bar
change to the locked state for the calmail server even though the page content
hasn't changed.  The choice of the STOP button is not special... any error
condition would likely yield the same result.

Comment 3

13 years ago
I believe this bug is a result of the patch for bug 148981.  I think it may be
wrong to synthesize a STATE_TRANSFERRING event when the status of the request is
a failure code and when it has not already transferred some data (the only case
where we would be synthesizing STATE_TRANSFERRING).

That patch was added in 2002 by rpotts, and I later added a further condition
that we skip that block of code when the status code is
NS_ERROR_BINDING_RETARGETED to fix security bug 257308.  Now, I think we should
just remove that block of code.

Patch coming up...

Comment 4

13 years ago
Created attachment 169740 [details] [diff] [review]
v1 patch - remove offending block of code

Comment 5

13 years ago
BTW, the reason why "httpChannel->GetResponseStatus(...)" was succeeding was
because we treated the text from the IMAP server as a HTTP/0.9 response (i.e., a
HTTP response with no status line or response headers).


13 years ago
Attachment #169740 - Flags: review?(cbiesinger)
Attachment #169740 - Flags: review?(cbiesinger) → review+

Comment 6

13 years ago
biesi raised an interesting point over irc:

It seems that this patch works because the HTTP channel's direct listener is not
the URI loader but rather an unknown content decoder.  It suppresses the ODA
because it is trying to figure out what sort of content the stream contains.

Perhaps it would make more sense to check if the request has been targeted or
not in place of the block of code I removed.  Only a targeted request (one with
the nsIChannel::LOAD_TARGETED load flag set) should trigger STATE_TRANSFERRING
(I think).  I might give that a try instead...

Comment 7

13 years ago
Created attachment 169752 [details] [diff] [review]
v2 patch

alternate patch.
Comment on attachment 169752 [details] [diff] [review]
v2 patch

yeah... I think this is a better approach. I still wonder why the data just
disappears, though...

anyway, r=biesi.
Attachment #169752 - Flags: review+

Comment 9

13 years ago
it doesn't dissappear... instead it is stuck inside the unknown decoder's
internal buffer.  the decoder is waiting for the next ODA, but instead it gets
an OnStopRequest w/ status=NS_BINDING_ABORTED.  thus, the data is never pushed
to the final stream listener.


13 years ago
Attachment #169752 - Flags: superreview?(bzbarsky)

Comment 10

13 years ago
Comment on attachment 169752 [details] [diff] [review]
v2 patch

Attachment #169752 - Flags: superreview?(bzbarsky) → superreview+

Comment 11

13 years ago

dougt, is there any way you can verify the fix?
Last Resolved: 13 years ago
Resolution: --- → FIXED


13 years ago
Blocks: 248511
Blocks: 130949
Whiteboard: [sg:fix]
Shouldn't this be ported back to the branches?
Blocks: 278184, 278186
Flags: blocking1.7.6?


13 years ago
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.0.1?
Flags: blocking1.7.6?
Flags: blocking1.7.6+
Flags: blocking-aviary1.0.1?
Flags: blocking-aviary1.0.1+
Comment on attachment 169752 [details] [diff] [review]
v2 patch

Attachment #169752 - Flags: approval1.7.6+
Attachment #169752 - Flags: approval-aviary1.0.1+


13 years ago
Keywords: fixed-aviary1.0.1, fixed1.7.6

Comment 14

13 years ago
*** Bug 280461 has been marked as a duplicate of this bug. ***

Comment 15

13 years ago
Verified Fixed.  Test case with no longer
displays yellow background and lock icon when the page load is stopped.

M18b1/Trunk: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217

Aviary 1.0.1 Branch: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20050218 Firefox/1.0

M176 Branch: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)

Based on my testing, it looks like this has been fixed everywhere.
Group: security


13 years ago
Flags: blocking-aviary1.1?
Created attachment 187613 [details] [diff] [review]
patch for 1.4 branch
Attachment #187613 - Flags: superreview?(bzbarsky)
Attachment #187613 - Flags: review?(cbiesinger)
OS: Windows XP → All
Attachment #187613 - Flags: review?(cbiesinger) → review+


12 years ago
Attachment #187613 - Flags: superreview?(bzbarsky) → superreview+
You need to log in before you can comment on or make changes to this bug.