If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

XMLLists can contain non-xml

RESOLVED INVALID

Status

()

Core
JavaScript Engine
RESOLVED INVALID
9 years ago
8 years ago

People

(Reporter: sephr, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.8) Gecko/2009032712 Ubuntu/8.10 (intrepid) Firefox/3.0.8 GTB5
Build Identifier: 

XMLLists can contain non-xml. Take this code for example, where the indice of 0 is changed to a string:

    var x = new XMLList;
    x[0] = "alert(1)"
    uneval(x) == "alert(1)"
    // after bug 334628 is fixed: uneval(x) == "<>alert(1)</>"

Reproducible: Always

Steps to Reproduce:
1. Change an indice of an XMLList to a string.
2. uneval or use the toXMLString method.
Actual Results:  
"alert(1)"
After bug 334628 is fixed, it might be "<>alert(1)</>"

Expected Results:  
A TypeError is thrown.
(Reporter)

Comment 1

8 years ago
Seems like a problem with E4X spec, invalid for Mozilla.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.