Closed Bug 292637 Opened 19 years ago Closed 19 years ago

nsSchemaLoader can't load file:// urls

Categories

(Core Graveyard :: Web Services, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: doronr, Assigned: doronr)

Details

Attachments

(1 file, 1 obsolete file)

 
Not sure if I need any security checks.
Comment on attachment 182408 [details] [diff] [review]
code currently is http-centric, make it work from file:// as well.

Since SchemaLoader works from non-chrome js, are any security checks needed?
Attachment #182408 - Flags: superreview?(jst)
Attached patch cleaner pastchSplinter Review
Attachment #182408 - Attachment is obsolete: true
Attachment #182412 - Flags: superreview?(jst)
Attachment #182408 - Flags: superreview?(jst)
Comment on attachment 182412 [details] [diff] [review]
cleaner pastch

+  if (eventType.EqualsLiteral("load")) {
[...]
+	 succeeded = PR_TRUE;
[...]
+  }
+
+  if (succeeded && eventType.EqualsLiteral("load")) {

Maybe move this succeeded check into the above eventType.EqualsListeral("load")
check to eliminate the redundant "load" check?

sr=jst
Attachment #182412 - Flags: superreview?(jst) → superreview+
Attachment #182412 - Flags: review?(cbiesinger)
Comment on attachment 182412 [details] [diff] [review]
cleaner pastch

+      if (!StringBeginsWith(spec, NS_LITERAL_CSTRING("http:")) &&
+	   !StringBeginsWith(spec, NS_LITERAL_CSTRING("https:"))) {

uri->SchemeIs("http")?

or you could check if the channel QIs to nsIHttpChannel

either way, r=biesi
Attachment #182412 - Flags: review?(cbiesinger) → review+
Comment on attachment 182412 [details] [diff] [review]
cleaner pastch

a=mkaply
Attachment #182412 - Flags: approval-aviary1.1a+
checked in with the QI method
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: