Closed Bug 274208 Opened 20 years ago Closed 20 years ago

ssl domain name mismatch warning cancel button does not get focused correctly

Categories

(Core Graveyard :: Security: UI, defect, P1)

Other Branch

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: chris_se, Assigned: KaiE)

Details

(Whiteboard: [sg:nse])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0

When connecting to a HTTPS server that uses a certificate that does not match
the host name (you can verify that by connecting to https://207.126.111.200/
(the IP adress of bugzilla.mozilla.org) a dialog box prompts the user if he is
willing to proceed. It contains 4 buttons: "View Certificate", "OK", "Cancel"
and "Help". The OK button has the focus. You may use tab to change the focus to
the "Cancel" button. Now, if you press [Space] while the "Cancel" button has the
focus, the dialog closes and the connection is *not* established (everything
fine here). But if you press [Enter] while the "Cancel" button the connection is
established nevertheless. This also occurs with the "Help" and "View
Certificate" buttons.

Additionally, if you press [Escape] to cancel the dialog, it will reappear
shortly after. If you press [Escape] again (or click on the cancel button of the
second dialog or press [Tab] and then [Space]), the dialog is closed finally and
the connection will *not* be established. Note that if you reenter the url after
you canceled the connection, pressing [Escape] will not cause the dialog to
appear again - this only happens the first time you access that server.

I don't know if these are two bugs or this is the same bug. The first problem is
definitely a security problem in my eyes because the user thinks he has the
focus on the cancel button and presses enter and then the connection to that
site is established against his whish. The second one is only an annoyance
because the connection will not be established if you cancel the second dialog.

Reproducible: Always
Steps to Reproduce:
1. Restart your browser.
2. Go to https://207.126.111.200/
3. Press tab when the dialog appears. Make sure the cancel button has the focus.
4. Press enter.

Actual Results:  
The connection is established.

Expected Results:  
The connection should not be established.

I was able to reproduce this with Mozilla 1.7 on Gentoo Linux and Firefox 1.0 on
Windows 2000.
Confirming: Enter always activates the default button rather than the selected
button. Component->PSM

Clearing confidential flag.
Assignee: darin → kaie
Group: security
Status: UNCONFIRMED → NEW
Component: Networking: HTTP → Client Library
Ever confirmed: true
Product: Core → PSM
QA Contact: core.networking.http
Whiteboard: [sg:nse]
Version: Trunk → unspecified
Bug 251991 fixed this on the trunk, except for a strange layout problem that's
causing the dialogs to display improperly; however once that's resolved we can
simply port the appropriate patches to the appropriate branch(es).
I agree this should be fixed with a high priority.
Severity: normal → major
Priority: -- → P1
Status: NEW → ASSIGNED
This seems fixed to me on Mozilla trunk.

On Linux, using either a GTK1 or GTK2 build, the domain mismatch dialog now
looks slightly differently, probably caused by central changes to the dialog box
behaviour.

When the Cancel button is focused, pressing enter indeed cancels the operation.

WORKSFORME with current trunk.
Please reopen if you still see the problem with nightly builds.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
Do we want the fixes on any branches?
Do we know what other changes exactly fixed it?
I think bug 251991 and bug 274703 cover it.
Product: PSM → Core
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.