Closed Bug 320567 Opened 19 years ago Closed 19 years ago

document.domain disables DOMParser

Categories

(Core :: XML, defect)

1.8 Branch
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 301678

People

(Reporter: tomn, Assigned: peterv)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; da; rv:1.8) Gecko/20051111 Firefox/1.5

When calling DOMParser with a string after setting document.domain I get a permission denied.

Reproducible: Always

Steps to Reproduce:
1. Set domain "www.foo.com" to "foo.com" with document.domain 
2. Parse a string with DOMParser DOMParser.parseFromString("<test>content</test>", "text/xml"); 
3. Cannot access parsed XML document anymore

Actual Results:  
Cannot access parsed XML document - access denied

Expected Results:  
documentElement should return the element that is a direct child of document, which in this case would be the <test> element.

This bug disables any use of DOMParser and XMLHttpRequest if in a frameset with different subdomains. In my case we have a frameset with multible subsites, forcing me to use document.domain. Now we need to parse a local string without calling an external document - so why the access denied? My testcase example is working in IE, Opera and Safari.
Attachment #206121 - Attachment is obsolete: true
Attached file Testcase
Assignee: xml → peterv
Attachment #206123 - Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
This is fixed on the trunk, we should find which patch fixed this.
Version: Trunk → 1.8 Branch

*** This bug has been marked as a duplicate of 301678 ***
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
*** Bug 324046 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: