Bug 6212
Summary: | Investigate disallowing some XMLHttpRequest headers from being set via setRequestHeader | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> |
Component: | XML | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | alice.barraclough, bugs-webkit, ian |
Priority: | P2 | Keywords: | InRadar |
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Alexey Proskuryakov
Firefox blocks setting some XMLHttpRequest headers for security reasons. All or most of these are
already overridden by the network layer in WebKit, but that needs to be verified, and the checks should
probably be added to the cross-platform layer. See:
http://whatwg.org/specs/web-apps/current-work/#setrequestheader
https://bugzilla.mozilla.org/show_bug.cgi?id=302809
https://bugzilla.mozilla.org/show_bug.cgi?id=302263
https://bugzilla.mozilla.org/show_bug.cgi?id=308484
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Darin Adler
I don't necessarily agree that we should add the prohibition to the cross-platform layer.
But it is indeed worth researching this.
I don't really like having a P1 bug for something that might not even be broken, though.
Alexey Proskuryakov
(In reply to comment #1)
I'm not sure if this counts as broken, but WebKit at least allows overriding Via (https://
bugzilla.mozilla.org/show_bug.cgi?id=302263#c5) and doesn't ignore Content-Length set on empty
requests (https://bugzilla.mozilla.org/show_bug.cgi?id=302263#c17). Possibly more.
Alice Liu
<rdar://problem/4403688>
Alexey Proskuryakov
It is also somewhat unclear how security violations should be handled in different cases (silently ignoring
vs. throwing).
Darin Adler
Setting this to P2. If we find any real examples of problems, they might qualify as P1 bugs.
Alexey Proskuryakov
A fix was committed in revision 18863 (brought in sync with the draft spec).