Bug 273553

Summary: Test for parsing XML with WebCore and libxml2 in the same process
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 273045    
Bug Blocks:    

Description David Kilzer (:ddkilzer) 2024-05-01 09:08:32 PDT
Test for parsing XML with WebCore and libxml2 in the same process.

Adding a test for this fix:

    [WK1] WebKit XML parsing can deny external entity loads from other in-process libxml2 clients
    https://bugs.webkit.org/show_bug.cgi?id=273045
    <rdar://126476952>
    <https://commits.webkit.org/278168@main>

<rdar://127295719>
Comment 1 David Kilzer (:ddkilzer) 2024-05-01 09:18:11 PDT
Verified the new API test breaks (as expected) when locally reverting the fix for Bug 273045:

$ ./Tools/Scripts/run-api-tests --no-timeout --no-build --release TestWebKitAPI.XMLParsing.WebCoreDoesNotBreakLibxml2
Running tests       

OpenSource/Tools/TestWebKitAPI/Tests/WebCore/XMLParsing.mm:47
Value of: !!doc
  Actual: false
Expected: true


worker/0 TestWebKitAPI.XMLParsing.WebCoreDoesNotBreakLibxml2 Failed
Ran 1 tests of 1 with 0 successful
------------------------------
Test suite failed

Failed

    TestWebKitAPI.XMLParsing.WebCoreDoesNotBreakLibxml2
        OpenSource/Tools/TestWebKitAPI/Tests/WebCore/XMLParsing.mm:47Value of: !!doc  Actual: falseExpected: true
Comment 2 David Kilzer (:ddkilzer) 2024-05-01 11:02:06 PDT
Pull request: https://github.com/WebKit/WebKit/pull/27989
Comment 3 EWS 2024-05-02 06:14:51 PDT
Committed 278253@main (8130984fb356): <https://commits.webkit.org/278253@main>

Reviewed commits have been landed. Closing PR #27989 and removing active labels.
Comment 4 David Kilzer (:ddkilzer) 2024-05-03 12:49:25 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/28118
Comment 5 EWS 2024-05-03 18:19:22 PDT
Committed 278359@main (a759149fe1d9): <https://commits.webkit.org/278359@main>

Reviewed commits have been landed. Closing PR #28118 and removing active labels.