Closed Bug 396443 Opened 18 years ago Closed 18 years ago

SVG documents only documents that don't do an Enumerate security check

Categories

(Core :: SVG, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: jst)

Details

Attachments

(1 file, 1 obsolete file)

All of our document classes use "DOCUMENT_SCRIPTABLE_FLAGS|nsIXPCScriptable::WANT_ENUMERATE" as the scriptable flags in nsDOMClassInfo.cpp, except for SVG which uses plain DOCUMENT_SCRIPTABLE_FLAGS. Maybe that's ok; if so this bug should be marked invalid. If it's not ok, I would suggest just rolling nsIXPCScriptable::WANT_ENUMERATE into DOCUMENT_SCRIPTABLE_FLAGS.
Does nsDOMClassInfo::Enumerate actually have to do a security check anymore? I think I simply missed that when I was cleaning nsDOMClassInfo up for XOWs. In fact, I see that I missed a bunch of access checks that I think XOWs subsume.
Good question. If we can remove these checks, so much the better! I just think SVGDocument should be doing the same thing as other documents, whatever that thing is.
We should really either be doing these checks, or remove them. One or the other...
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
If this is to block 1.9 then we really need someone assigned to this, and I have no clue about this stuff.
Re-setting schrep's original blocking1.9+ and marking P1 in case any fix needs the extra testing of a beta release.
Flags: tracking1.9+ → blocking1.9+
Priority: P2 → P1
OS: Linux → All
Hardware: PC → All
jst and mrbkap should advise. /be
Attached patch Fix. (obsolete) — Splinter Review
Yeah, I see no reason why we wouldn't want this, especially now that window.document is no longer allAccess which means that other origins shouldn't be able to reach the document, though if they do they certainly shouldn't be able to enumerate it.
Assignee: nobody → jst
Status: NEW → ASSIGNED
Attachment #307737 - Flags: superreview?(mrbkap)
Attachment #307737 - Flags: review?(mrbkap)
Oh, I missed earlier comments about whether we need this at all any more. Probably not, XOWs and no more allAccess should make us pretty safe here even w/o this check. I could go either way. Same patch w/o the first hunk if we don't want this any more, unless we go even further and remove the security checking enumerate hook alltogether.
Can we assert for DEBUG builds that a check is unnecessary? Do that and remove release-build code and everyone wins, I think we are pretty confident that XOWs and stuff work. /be
Same thing, but makes the security checks in the enumerate hook debug only, and make them only assert.
Attachment #307737 - Attachment is obsolete: true
Attachment #307784 - Flags: superreview?(mrbkap)
Attachment #307784 - Flags: review?(mrbkap)
Attachment #307737 - Flags: superreview?(mrbkap)
Attachment #307737 - Flags: review?(mrbkap)
Attachment #307784 - Flags: superreview?(mrbkap)
Attachment #307784 - Flags: superreview+
Attachment #307784 - Flags: review?(mrbkap)
Attachment #307784 - Flags: review+
Fix landed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: