Closed
Bug 290291
Opened 20 years ago
Closed 20 years ago
Unchecked JS_GetPrivate calls in DOMJSClass_toString
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
People
(Reporter: shaver, Assigned: sicking)
References
()
Details
(Keywords: fixed-aviary1.0.3, fixed1.7.7)
Attachments
(1 file, 1 obsolete file)
1.59 KB,
patch
|
brendan
:
review+
brendan
:
superreview+
brendan
:
approval-aviary1.0.3+
brendan
:
approval1.7.7+
brendan
:
approval1.8b2+
|
Details | Diff | Splinter Review |
As in bug 290162, we trust too much that we will only get objects of the
appropriate class as |this| for this method. Crashing test case, due to deref
of bogus pointer:
javascript:a=new Number(0x12345678);a.toString=Node.toString;alert(a)
(Sadly, perhaps, I can't use Node.toString.call, because it doesn't exist,
though Node.toString has a typeof "function".)
Not sure if the obvious fix (JS_GetInstancePrivate against sDOMJSClass) is
correct here, because I don't quite have all of the delegation model wired up in
my head at this hour.
Comment 1•20 years ago
|
||
nominating to get on the radar
Flags: blocking1.8b2?
Flags: blocking1.7.7?
Flags: blocking-aviary1.1+
Flags: blocking-aviary1.0.3?
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Assignee: jst → bugmail
Status: ASSIGNED → NEW
Assignee | ||
Comment 3•20 years ago
|
||
I changed the assertion to a warning since this can happen without error on our
side.
Status: NEW → ASSIGNED
Assignee | ||
Updated•20 years ago
|
Attachment #180750 -
Flags: superreview?(shaver)
Attachment #180750 -
Flags: review?(shaver)
Reporter | ||
Comment 4•20 years ago
|
||
Comment on attachment 180750 [details] [diff] [review]
patch to fix
In a more perfect world, we'd throw something like INVALID_ARG, but this will
more than do for 1.0.3. r+sr=shaver, requesting approval for branch and trunk.
Attachment #180750 -
Flags: superreview?(shaver)
Attachment #180750 -
Flags: superreview+
Attachment #180750 -
Flags: review?(shaver)
Attachment #180750 -
Flags: review+
Attachment #180750 -
Flags: approval1.8b2?
Attachment #180750 -
Flags: approval1.7.7?
Attachment #180750 -
Flags: approval-aviary1.0.3?
Comment 5•20 years ago
|
||
Comment on attachment 180750 [details] [diff] [review]
patch to fix
a=asa
Attachment #180750 -
Flags: approval1.8b2? → approval1.8b2+
Comment 6•20 years ago
|
||
Comment on attachment 180750 [details] [diff] [review]
patch to fix
a=chase for branches
Attachment #180750 -
Flags: approval1.7.7?
Attachment #180750 -
Flags: approval1.7.7+
Attachment #180750 -
Flags: approval-aviary1.0.3?
Attachment #180750 -
Flags: approval-aviary1.0.3+
Comment 7•20 years ago
|
||
jst thought peterv may have written this native method; cc'ing him so he can
repent and sin no more ;-).
/be
Comment 8•20 years ago
|
||
Attachment #180750 -
Attachment is obsolete: true
Attachment #180751 -
Flags: superreview+
Attachment #180751 -
Flags: review+
Attachment #180751 -
Flags: approval1.8b2+
Attachment #180751 -
Flags: approval1.7.7+
Attachment #180751 -
Flags: approval-aviary1.0.3+
Comment 9•20 years ago
|
||
Fixed everywhere.
/be
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 10•20 years ago
|
||
tested with the 2005041422-1.0.3 ffox build on linux fc3, I no longer crash with
the test case in comment 0 (entering it in the Location field).
Comment 11•20 years ago
|
||
looks good on Fx trunk build 2005-04-15-07-trunk
No crash with the following error in js console:
Error: uncaught exception: [Exception... "Could not convert JavaScript argument
arg 0 [nsIDOMWindowInternal.alert]" nsresult: "0x80570009
(NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: javascript:a=new
Number(0x12345678);a.toString=Node.toString;alert(a) :: <TOP_LEVEL> :: line 1"
data: no]
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Flags: blocking1.8b2?
Updated•20 years ago
|
Flags: blocking1.7.7?
Flags: blocking-aviary1.0.3?
Updated•20 years ago
|
Keywords: fixed-aviary1.0.3,
fixed1.7.7
Updated•20 years ago
|
Group: security
You need to log in
before you can comment on or make changes to this bug.
Description
•