Closed
Bug 151933
Opened 23 years ago
Closed 23 years ago
xml:base should not allow setting chrome URLs
Categories
(Core :: XML, defect, P1)
Core
XML
Tracking
()
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)
References
Details
(Whiteboard: [ADT2 RTM][fixed on trunk 6/24, branch 6/26])
Attachments
(2 files, 2 obsolete files)
3.12 KB,
patch
|
harishd
:
review+
jst
:
superreview+
jud
:
approval+
|
Details | Diff | Splinter Review |
689 bytes,
text/xml
|
Details |
It seems HTML base tag will not let you set chrome URLs, but xml:base does.
Quick test did not show this to cause security issues (for example link to
chrome did still not work, nor did a script on a page get chrome privileges),
but this should be fixed nevertheless in case there are other issues that I have
not tested.
Comment 1•23 years ago
|
||
keyword foo. Nominating, priority 2.
Keywords: mozilla1.0.1,
nsbeta1
Whiteboard: [ADT2 RTM]
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 2•23 years ago
|
||
This adds a security check at the end of GetXMLBaseURI(), similar to
nsDocument::SetBaseURL(nsIURI* aURL).
Because XML Base is calculated on demand and not cached, the side effect is
that we'll get security warnings every time someone tries to acces baseURI
property with illegal value. There is an old bug open that would fix XML Base
so that it's value is cached correctly (it is not trivial, DOM changes can
change XML Base value).
Comment 3•23 years ago
|
||
Comment on attachment 88582 [details] [diff] [review]
Proposed fix
Don't we want to pass back the parent element's base URI and not the document's
URI if the security manager denies access to the current element's base URI?
Assignee | ||
Comment 4•23 years ago
|
||
Comment on attachment 88582 [details] [diff] [review]
Proposed fix
Yeah, I thought of that at home, I'll make a new patch.
Attachment #88582 -
Attachment is obsolete: true
Attachment #88582 -
Flags: needs-work+
Assignee | ||
Comment 5•23 years ago
|
||
Now, if security check fails, we start from the parent of the last content
element we tried, and recursively call GetXMLBaseURI(). If there was no parent,
just get the document base.
Comment 6•23 years ago
|
||
Comment on attachment 88676 [details] [diff] [review]
Fix 2
sr=jst
Attachment #88676 -
Flags: superreview+
Assignee | ||
Comment 7•23 years ago
|
||
Oops, need the _base_ URI if there is one, and only if that is null get the
document URI as baseURI.
Attachment #88676 -
Attachment is obsolete: true
Comment 8•23 years ago
|
||
Comment on attachment 88712 [details] [diff] [review]
Fix 3
sr=jst
Attachment #88712 -
Flags: superreview+
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment on attachment 88712 [details] [diff] [review]
Fix 3
r=harishd
Attachment #88712 -
Flags: review+
Assignee | ||
Comment 10•23 years ago
|
||
Fixed on trunk.
Keywords: adt1.0.1
Whiteboard: [ADT2 RTM] → [ADT2 RTM][fixed on trunk 6/24]
Assignee | ||
Comment 11•23 years ago
|
||
Sent email for ADT & drivers approval.
Comment 12•23 years ago
|
||
Heikki, can you make the bugs Resolved/fixed
Chris, can you verify the fix on the trunk. Thx.
Comment 13•23 years ago
|
||
resolving as fixed per Comment #10 From Heikki Toivonen.
Blocks: 143047
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Whiteboard: [ADT2 RTM][fixed on trunk 6/24] → [ADT2 RTM][fixed on trunk 6/24] [ETA 06/27]
Comment 14•23 years ago
|
||
can someone verify this?
Comment 15•23 years ago
|
||
Comment 16•23 years ago
|
||
Verified in the 2002-06-26-08 Win ME and OS X trunk builds.
Status: RESOLVED → VERIFIED
Updated•23 years ago
|
Attachment #88712 -
Flags: approval+
Comment 17•23 years ago
|
||
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+"
keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1 → mozilla1.0.1+
Comment 18•23 years ago
|
||
adt1.0.1+ (on ADT's behalf) approval for checkin on the 1.0 branch. please
checkin asap, then replace the "mozilla1.0.1+" keyword and with the "fixed1.0.1".
Assignee | ||
Comment 19•23 years ago
|
||
Fixed on the branch too.
Keywords: mozilla1.0.1+ → fixed1.0.1
Whiteboard: [ADT2 RTM][fixed on trunk 6/24] [ETA 06/27] → [ADT2 RTM][fixed on trunk 6/24, branch 6/26]
Comment 20•23 years ago
|
||
Verified with Windows June 27th (2002-06-27-08 branch) and OS X July 1
(2002-07-01-08 branch).
Updated•23 years ago
|
Keywords: verified1.0.1
Updated•22 years ago
|
Group: security?
You need to log in
before you can comment on or make changes to this bug.
Description
•