XML templates don't load from file://

RESOLVED FIXED

Status

()

--
major
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: sigh, Assigned: enndeakin)

Tracking

({fixed1.9.1})

unspecified
fixed1.9.1
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-GB; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5

http://developer.mozilla.org/samples/xultemp/template-guide-ex32b.xul doesn't work when running from local disk with its RDF datafile local too (file://)

Reproducible: Always

Steps to Reproduce:
1.open http://developer.mozilla.org/samples/xultemp/template-guide-ex32b.xul
2.save to Desktop
3.open http://developer.mozilla.org/samples/xultemp/template-guide-streets.rdf
4. save to Desktop
5. open Desktop/template-guide-ex32b.xul from File->Open File...
Actual Results:  
window frame but no content

Expected Results:  
full tree contents as seen at 
http://developer.mozilla.org/samples/xultemp/template-guide-ex32b.xul

Comment 1

11 years ago
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008050918 Minefield/3.0pre

1)  Just going to the first link doesn't work right away.  I had to close the tab and then open the link again.

2)  Your steps are wrong.  The second file should be:
http://developer.mozilla.org/samples/xultemp/people2.xml

However, that doesn't work either.  So, I guess I can confirm this, but that's in addition to it barely working when NOT at a file:// URI.
(Reporter)

Comment 2

11 years ago
Dave - you are absolutely correct... its my error!
I should have referred to the RDF-based example in set 1):
http://developer.mozilla.org/samples/xultemp/template-guide-ex32.xul

However, I can confirm that I ALSO see your described error when loading:
http://developer.mozilla.org/samples/xultemp/template-guide-ex32b.xul
- my FFb3 also takes two loads of this URL to succeed.

Looks like we have TWO bugs here, folks

Comment 3

11 years ago
Quick search turns up bug 427551 for this.
(Reporter)

Comment 4

11 years ago
Hmmm... bug 427551 is about inline vs http loaded XML, 
which is slightly different though related.

Comment 5

11 years ago
CCing a XUL templates guy.  These seem to be a major issues, so any comments would be appreciated.
(Reporter)

Comment 6

11 years ago
well smart :o)
I've just done a regression against FF2.0.0.12 and
http://developer.mozilla.org/samples/xultemp/template-guide-ex32.xul
works perfectly when accessed via http://, file:// and chrome://
I'm still setting up the test-bed for checking this for chrome:// in FF3b5.

Updated

11 years ago
Status: UNCONFIRMED → NEW
Component: General → XP Toolkit/Widgets: XUL
Ever confirmed: true
OS: Mac OS X → All
Product: Firefox → Core
QA Contact: general → xptoolkit.xul
Hardware: Macintosh → All

Updated

10 years ago
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
(Assignee)

Comment 7

10 years ago
Created attachment 355428 [details] [diff] [review]
Use CheckMayLoad rather than comparing principals

This patch does a better uri security check. bz suggests that queryprocessor::LoadDatasources should be doing this check, since redirects would need to be handled anyway. I'm not really convinced that its better to put the onus on requiring query processors to do all of these checks (which other implementors wouldn't understand how to do), than to have the builder do most of this work itself.

I think we should just keep a CheckMayLoad check for compatibilty and add clearer api documentation.
Assignee: nobody → enndeakin
Status: NEW → ASSIGNED

Updated

10 years ago
Duplicate of this bug: 474821
(Assignee)

Comment 9

10 years ago
Created attachment 376407 [details] [diff] [review]
updated patch

This bug is actually preventing the crashtest in bug 441785 from even running.
Attachment #355428 - Attachment is obsolete: true
Attachment #376407 - Flags: superreview?(Olli.Pettay)
Attachment #376407 - Flags: review?(Olli.Pettay)

Comment 10

10 years ago
Comment on attachment 376407 [details] [diff] [review]
updated patch

Looks reasonable, but please add testcases. Both for successful and failing cases.
Attachment #376407 - Flags: superreview?(Olli.Pettay)
Attachment #376407 - Flags: superreview+
Attachment #376407 - Flags: review?(Olli.Pettay)
Attachment #376407 - Flags: review+
(Assignee)

Comment 11

10 years ago
The patch is bug 492037 has a success test for this. I'll add a fail case.
Blocks: 492037
Keywords: checkin-needed

Updated

10 years ago
Attachment #376407 - Flags: approval1.9.1+
(Assignee)

Comment 12

10 years ago
Created attachment 376989 [details] [diff] [review]
This patch adds a http redirect test, which checks redirects from the same host and from a different host
(Assignee)

Updated

10 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Could this have caused crashtest 441785-1.xul to have started to fail?
(Assignee)

Updated

9 years ago
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.