Closed Bug 306288 Opened 20 years ago Closed 9 years ago

Security UI callbacks for embedders have no useful context information

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: sfraser_bugs, Unassigned)

Details

(Whiteboard: [kerh-ehz])

For an embedder implementing nsICertificateDialogs, nsIBadCertListener or nsISecurityWarningDialogs, there's no way to get at the originating nsIDOMWindow from the various callback methods. This is a serious security issue, because the emedder cannot preset UI to the user that indicates where the request is coming from. For our other dialogs (via nsIPromptService) we are provided an nsIDOMWindow. NSS/PSM needs to do the same. The provided nsIInterfaceRequestor* ctx is not useful; it's only queryable to an nsIPrompt.
OS: MacOS X → All
Hardware: Macintosh → All
in: http://lxr.mozilla.org/seamonkey/source/security/manager/pki/src/nsNSSDialogs.cpp we seam to be doing something like: nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx); Is this not working for you?
(In reply to comment #1) > in: > http://lxr.mozilla.org/seamonkey/source/security/manager/pki/src/nsNSSDialogs.cpp > > we seam to be doing something like: > nsCOMPtr<nsIDOMWindowInternal> parent = do_GetInterface(ctx); > > Is this not working for you? I just debugged through this in DeerPark. |parent| there in nsNSSDialogs::ConfirmDownloadCACert() is a null pointer (note that the code doesn't check it).
Very odd. Tracing back a bit on the stack, don't you see a new'ed PipUIContext on either: http://lxr.mozilla.org/seamonkey/source/security/manager/ssl/src/nsNSSComponent.cpp#2428 http://lxr.mozilla.org/seamonkey/source/security/manager/ssl/src/nsNSSCertificateDB.cpp#1029 In any case, your right... this object doesn't really get you to where you need to be.
Yeah, PipUIContext is a waste of space.
Can we clear the security-sensitive flag? What are we protecting here?
Sure. Just trying to be paranoid.
Group: security
Bug 277587 may have helped.
(In reply to comment #7) > Bug 277587 may have helped. > That fixed it for the interface requestor passed to nsISecurityWarningDialogs methods; all others still have the problem.
Whiteboard: [kerh-ehz]
Assignee: kengert → nobody
QA Contact: psm
This doesn't seem to be relevant anymore.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.