)]}'
{
  "commit": "03eda1e66c764309492350d2013a82d7a01dd564",
  "tree": "a16a0953f74e574f9c322143961b565584ae088b",
  "parents": [
    "f7b3aa828c41ad1a260e0ad5f07292adf34febd1"
  ],
  "author": {
    "name": "Chris Dumez",
    "email": "cdumez@apple.com",
    "time": "Sat Sep 05 02:49:37 2026"
  },
  "committer": {
    "name": "Adrian Perez de Castro",
    "email": "aperez@igalia.com",
    "time": "Sat Sep 05 02:49:37 2026"
  },
  "message": "Cherry-pick 320304@main (d4867a890432). https://bugs.webkit.org/show_bug.cgi?id\u003d323060\n\n    Regression(314177@main) SetRawCookie\u0027s MESSAGE_CHECKs reject legitimate cookie writes from third-party iframes\n    https://bugs.webkit.org/show_bug.cgi?id\u003d323060\n    rdar://177769847\n\n    Reviewed by Ben Nham.\n\n    NetworkConnectionToWebProcess::setRawCookie validated cookie.domain and\n    url against firstParty:\n    ```\n    MESSAGE_CHECK(RegistrableDomain::uncheckedCreateFromHost(cookie.domain).matches(firstParty));\n    MESSAGE_CHECK(RegistrableDomain(url).matches(firstParty));\n    ```\n\n    This is too strict. WebCookieJar::setRawCookie passes\n    document.firstPartyForCookies() as firstParty (the top-level page\u0027s URL)\n    and document.cookieURL() as url (the document\u0027s own URL). For a\n    third-party iframe these legitimately differ, so the checks terminate\n    the WebProcess whenever Web Inspector or internals.setCookie is used in\n    a cross-site iframe.\n\n    Replace the two checks with an integrity check that cookie.domain\u0027s\n    registrable domain matches url, mirroring the existing posture of\n    setCookieFromDOMAsync which validates firstParty only and trusts the\n    url/cookie pair. The new check still rejects a mismatched\n    cookie.domain/url pair (the most useful invariant) without coupling\n    either to the unrelated top-level firstParty.\n\n    Tests: http/tests/cookies/set-raw-cookie-in-third-party-iframe.html\n           ipc/set-raw-cookie-empty-commenturl-crash.html\n           ipc/set-raw-cookie-firstparty-message-check.html\n\n    * LayoutTests/http/tests/cookies/resources/set-raw-cookie-in-third-party-iframe-frame.html: Added.\n    * LayoutTests/http/tests/cookies/set-raw-cookie-in-third-party-iframe-expected.txt: Added.\n    * LayoutTests/http/tests/cookies/set-raw-cookie-in-third-party-iframe.html: Added.\n    Add test coverage for the overly strict checks.\n\n    * LayoutTests/ipc/set-raw-cookie-empty-commenturl-crash-expected.txt: Added.\n    * LayoutTests/ipc/set-raw-cookie-empty-commenturl-crash.html: Added.\n    * LayoutTests/ipc/set-raw-cookie-firstparty-message-check-expected.txt: Added.\n    * LayoutTests/ipc/set-raw-cookie-firstparty-message-check.html: Added.\n    Add test coverage for what 314177@main was trying to fix, to make sure\n    that we don\u0027t regress it.\n\n    * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:\n    (WebKit::NetworkConnectionToWebProcess::setRawCookie):\n\n    Canonical link: https://commits.webkit.org/320304@main\n\nCanonical link: https://commits.webkit.org/317695.201@webkitglib/2.54\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1bb1b58f2851e140fbfa838cf57faaa86f0f23b0",
      "new_mode": 33188,
      "new_path": "LayoutTests/http/tests/cookies/resources/set-raw-cookie-in-third-party-iframe-frame.html"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "cc92e876a6b5afe2f66de20cd038737de37d3849",
      "new_mode": 33188,
      "new_path": "LayoutTests/http/tests/cookies/set-raw-cookie-in-third-party-iframe-expected.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7d9d409fd97b8e22a697160d36def198c1b8515e",
      "new_mode": 33188,
      "new_path": "LayoutTests/http/tests/cookies/set-raw-cookie-in-third-party-iframe.html"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "53a7ef52be79356ed90401552c6f463237f84369",
      "new_mode": 33188,
      "new_path": "LayoutTests/ipc/set-raw-cookie-empty-commenturl-crash-expected.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e4d0520057f3b302a179cee62cafdbb5026b9670",
      "new_mode": 33188,
      "new_path": "LayoutTests/ipc/set-raw-cookie-empty-commenturl-crash.html"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a5dc1eacc9ad0434e250f0fd646848d489317071",
      "new_mode": 33188,
      "new_path": "LayoutTests/ipc/set-raw-cookie-firstparty-message-check-expected.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c3cc92e28139668d8ca990e41c16d7f37ca5a30b",
      "new_mode": 33188,
      "new_path": "LayoutTests/ipc/set-raw-cookie-firstparty-message-check.html"
    },
    {
      "type": "modify",
      "old_id": "de582a9eda6faba98b64eb45e2467328ed2c7ba7",
      "old_mode": 33188,
      "old_path": "Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp",
      "new_id": "11674b7a1725f6d680495e55529b4e1aa128f414",
      "new_mode": 33188,
      "new_path": "Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp"
    }
  ]
}
