Closed Bug 294617 Opened 20 years ago Closed 20 years ago

xsl-stylesheet not loaded when href is remote URI

Categories

(Core :: XSLT, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 236328

People

(Reporter: soren.mogensen, Assigned: peterv)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

The xsl-stylesheet is only loaded when the href is relative to the xml document,
or absolute and served from same host as xml document.

E.g. having xml+dtd+xsl under htdocs on localhost - xsl is applied correctly
when accessing xml as http://localhost/my.xml (xsl referenced as
http://localhost/my.xsl). However, if xml file is opened directly from file
system, the xsl is not applied (xsl still referenced as http://localhost/my.xsl).

Reproducible: Always

Steps to Reproduce:
1. create xml file with absolute xsl reference, e.g. <?xml-stylesheet
type="text/xsl" href="http://localhost/my.xsl"?>

2. access xml file through localhost, e.g. "http://localhost/my.xml" - this
works correctly.

3. access xml file through file system, e.g. "file:///c:/htdocs/my.xml" - then
xsl is not applied.

Actual Results:  
The xsl is applied correctly when xml + xsl located together (and accessed with
same base URI).

XSL is not applied when accessed with different base URI.

Expected Results:  
XSL href should have been parsed as full URI and applied regardless of how the
XML document was accessed.


Could be related to https://bugzilla.mozilla.org/show_bug.cgi?id=286132

What I am trying to achieve is to host dtd+xsl on a server, while being able to
send xml documents as email attachments, than will correctly apply the hosted
xsl when opened in firefox.
this is a security issue. See bug 236328 and bug 205294, and there's more if you
search closed bugs

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