Closed Bug 465961 Opened 16 years ago Closed 5 years ago

nsWyciwygProtocolHandler::NewURI shouldn't allow firefox to create lame wyciwyg urls

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

Attachments

(1 file)

###!!! ASSERTION: Must have a principal: 'mOwner', file c:/home/mozilla.org/mozi
lla-central/content/html/document/src/nsWyciwygChannel.cpp, line 293
0 PageProxySetIcon(aURL = "wyciwyg:/favicon.ico") ["chrome://browser/content/bro
wser.js":1962]
    this = [object ChromeWindow @ 0x239dab0 (native @ 0x239bdf0)]
1 anonymous(aBrowser = [object XULElement @ 0xa179e70 (native @ 0xa9c3798)]) ["c
hrome://browser/content/browser.js":3495]
    this = [object Object]
2 setIcon(aURI = [xpconnect wrapped nsIURI @ 0xc3b6ea8 (native @ 0xa6ca12c)], [x
pconnect wrapped nsIURI @ 0xc3b6ea8 (native @ 0xa6ca12c)]) ["chrome://browser/co
ntent/tabbrowser.xml":640]
    p = [object Object]
    i = 0
    ios = [xpconnect wrapped nsIIOService @ 0xcdc2c20 (native @ 0xd97b28)]
    browser = [object XULElement @ 0xa179e70 (native @ 0xa9c3798)]
    this = [object XULElement @ 0x4031670 (native @ 0x3d94a60)]
3 useDefaultIcon(aTab = [object XULElement @ 0xa983f20 (native @ 0x7b5c940)]) ["
chrome://browser/content/tabbrowser.xml":713]
    url = "wyciwyg:/favicon.ico"
    req = undefined
    sz = undefined
    browser = [object XULElement @ 0xa179e70 (native @ 0xa9c3798)]
    this = [object XULElement @ 0x4031670 (native @ 0x3d94a60)]
4 anonymous([xpconnect wrapped (nsISupports, nsIDocShell, nsIWebNavigation, nsID
ocShellHistory, nsIInterfaceRequestor, nsIWebProgress) @ 0xd227958 (native @ 0x2
084cc1c)], [xpconnect wrapped (nsISupports, nsIRequest, nsIChannel) @ 0x807b108
(native @ 0xa37bcb8)], 786448, 0) ["chrome://browser/content/tabbrowser.xml":408
]
    p = undefined
    i = undefined
    location = undefined
    NS_ERROR_UNKNOWN_HOST = 2152398878
    nsIChannel = nsIChannel
    this = [object Object]
Attachment #349194 - Flags: review?(bzbarsky)
So here's my question... why do we allow this at all?  Under what circumstances would we _want_ someone creating a wyciwyg URI via newURI?

It might be better to have this newURI always throw and in the one place where we really create these URIs to do so via a non-public method...
Comment on attachment 349194 [details] [diff] [review]
restrict construction to wyciwyg://numbers/stuff

r- pending an answer to my question.
Attachment #349194 - Flags: review?(bzbarsky) → review-
Boris, is this still an issue? :)

(just trying to clean up some NEW bugs with non-empty URL field to see if there are relevant site compat problems hiding there)
Flags: needinfo?(bzbarsky)
It's still an issue, yes.  The assert no longer fires, at least not when coming via the UI from the URL bar, but the underlying problem is still there.
Flags: needinfo?(bzbarsky)

nsWyciwygProtocolHandler is going away in bug 1489308.

Depends on: 1489308

Fixed by bug 1489308. nsWyciwygProtocolHandler is gone.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: