Closed
Bug 939327
Opened 11 years ago
Closed 10 years ago
Provide scriptable utility functions to obtain URL bar domain
Categories
(Core :: Security, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 962326
People
(Reporter: mikeperry, Unassigned)
Details
Attachments
(1 file)
13.32 KB,
patch
|
Details | Diff | Splinter Review |
When making various security and privacy decisions about a page, it is often desirable to determine the URI in the location bar for a given sub-document to decide what to do. An easy to use utility function that provides the top-level location URI for an nsIChannel or an nsIDocument is an extremely useful thing to aid in these decisions.
In Tor Browser, we created a single API for this purpose that can take either an nsIChannel or nsIDocument. We resurrected the old mozIThirdPartyUtil.getOriginatingURI() API to use its logic for the channel case, and wrote our own logic for the nsIDocument case.
We chose this implementation because it made error handling simpler (for the case where both a channel and a document are available, but the channel path fails).
It is possible we want to rewrite this to fold in getOriginatingURI rather than resurrect it (since it was removed in Bug 769589), and/or to split it into two utility functions (one for the channel, one for the document). We're open to suggestions.
Updated•11 years ago
|
OS: Windows 7 → All
Hardware: x86 → All
Comment 1•10 years ago
|
||
I would suggest resolving this as a duplicate of Bug 962326.
Flags: needinfo?(mikeperry)
Comment 2•10 years ago
|
||
Yep, looks like same patch with some updates.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•10 years ago
|
Flags: needinfo?(mikeperry)
You need to log in
before you can comment on or make changes to this bug.
Description
•