http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 03:59:11 +0000 (03:59 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2014 03:59:11 +0000 (03:59 +0000)
commit8b887086517d0196421206dd4d2b9aed734185d2
treeb735fca3ec1bfccc027dee8a05410faa736e0ff6
parent5cd4268b25cc4f89a0aafb6b7ad7c003e1fbb12a
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
LayoutTests/ChangeLog
LayoutTests/fast/xmlhttprequest/resources/xmlhttprequest-nonexistent-file-real.html
LayoutTests/fast/xmlhttprequest/xmlhttprequest-nonexistent-file-expected.txt
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
Source/WebCore/platform/network/mac/ResourceHandleMac.mm
Source/WebCore/xml/XSLTProcessorLibxslt.cpp