http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=132523
Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2014-05-22
Reviewed by Alexey Proskuryakov.
Source/WebCore:
We should not manufacture a response in the event of an error during a
synchronous XHR. In addition, this test removes two places that are
sensitive to such a manufactured response.
Updates test expectations.
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::loadRequest): Don't inspect a
loader response if there is an error
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
manufacture a response
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
manufacture a response
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc): Only use the response's URL if no error
occurred.
LayoutTests:
Two tests have been rebaselined, and re-enable test that now passes. Because of
r23889, synchronous XHRs for file: URLs purposely don't invoke error handlers.
* fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt: Updated
incorrect test description
* fast/xmlhttprequest/resources/xmlhttprequest-nonexistent-file-real.html: Ditto
* platform/mac-wk2/TestExpectations: Re-enable test that now passes.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169243
268f45cc-cd09-0410-ab3c-
d52691b4dbfc