Closed Bug 1182544 Opened 5 years ago Closed 5 years ago

Use channel->ascynOpen2 in dom/xml/XMLDocument.cpp

Categories

(Core :: DOM: Security, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → mozilla
Blocks: 1182535
Depends on: 1191107
Comment on attachment 8643851 [details] [diff] [review]
bug_1182544_asyncopen2_xmldocument.patch

Review of attachment 8643851 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with that fixed.

::: dom/security/nsContentSecurityManager.cpp
@@ +147,5 @@
> +                 "type_xml requires requestingContext of type Document");
> +
> +      if (internalContentPolicyType ==
> +            nsIContentPolicy::TYPE_INTERNAL_XMLHTTPREQUEST) {
> +        mimeTypeGuess = NS_LITERAL_CSTRING("application/xml");

I think we'll need another internal type for document.load calls. XHR isn't going to want to use "application/xml" as mimeguess.

::: dom/xml/XMLDocument.cpp
@@ +409,5 @@
>    rv = NS_NewChannel(getter_AddRefs(channel),
>                       uri,
>                       callingDoc ? callingDoc.get() :
>                                    static_cast<nsIDocument*>(this),
> +                     nsILoadInfo::SEC_REQUIRE_SAME_ORIGIN_DATA_INHERITS,

This should be DATA_IS_BLOCKED. Look at the arguments to the CheckMayLoad call that you removed.
Attachment #8643851 - Flags: review?(jonas) → review+
url:        https://hg.mozilla.org/integration/mozilla-inbound/rev/f73f15ea2b8ea5e1654078b2bae16172af2c1f0f
changeset:  f73f15ea2b8ea5e1654078b2bae16172af2c1f0f
user:       Christoph Kerschbaumer <mozilla@christophkerschbaumer.com>
date:       Mon Aug 10 10:19:08 2015 -0700
description:
Bug 1182544 - Use channel->ascynOpen2 in dom/xml/XMLDocument.cpp (r=sicking)
https://hg.mozilla.org/mozilla-central/rev/f73f15ea2b8e
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.