Changeset 287000 in webkit
- Timestamp:
- Dec 13, 2021, 5:52:38 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 16 added
- 8 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/wincairo/TestExpectations (modified) (2 diffs)
-
LayoutTests/platform/wincairo/imported (added)
-
LayoutTests/platform/wincairo/imported/w3c (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/attributes (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/attributes/invalid-expected.txt (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/attributes/max-age-expected.txt (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/name (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/name/name-expected.txt (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/ordering (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/ordering/ordering.sub-expected.txt (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/path (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/path/match-expected.txt (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/samesite (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/samesite/about-blank-subresource.https-expected.txt (added)
-
LayoutTests/platform/wincairo/imported/w3c/web-platform-tests/cookies/samesite/about-blank-toplevel.https-expected.txt (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/network/curl/CookieJarDB.cpp (modified) (2 diffs)
-
Source/WebCore/platform/network/curl/CookieUtil.cpp (modified) (2 diffs)
-
Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/TestController.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r286997 r287000 1 2021-12-13 Christopher Reid <chris.reid@sony.com> 2 3 [Curl] Improve curl's cookie conformance in WPT 4 https://bugs.webkit.org/show_bug.cgi?id=232722 5 6 Reviewed by Fujii Hironori. 7 8 Add baseline for wpt cookie tests on wincairo 9 10 * platform/wincairo/TestExpectations: 11 1 12 2021-12-13 Robert Jenner <Jenner@apple.com> 2 13 -
trunk/LayoutTests/platform/wincairo/TestExpectations
r286927 r287000 1427 1427 storage/indexeddb/modern/aborted-put.html [ Timeout Pass ] 1428 1428 [ Debug ] storage/indexeddb/modern/index-rename-1.html [ Skip ] 1429 1430 # Flaky values in WPT cookie expectations 1431 imported/w3c/web-platform-tests/cookies/prefix/__secure.header.https.html [ Pass Failure ] 1432 imported/w3c/web-platform-tests/cookies/samesite-none-secure/cookies-without-samesite-must-be-secure.https.tentative.html [ Pass Failure ] 1433 imported/w3c/web-platform-tests/cookies/samesite/iframe.document.https.html [ Pass Failure ] 1434 imported/w3c/web-platform-tests/cookies/samesite/multiple-samesite-attributes.https.html [ Pass Failure ] 1435 imported/w3c/web-platform-tests/cookies/samesite/sandbox-iframe-nested.https.html [ Pass Failure ] 1436 imported/w3c/web-platform-tests/cookies/samesite/sandbox-iframe-subresource.https.html [ Pass Failure ] 1437 imported/w3c/web-platform-tests/cookies/samesite/setcookie-lax.https.html [ Pass Failure ] 1438 imported/w3c/web-platform-tests/cookies/samesite/setcookie-navigation.https.html [ Pass Failure ] 1439 imported/w3c/web-platform-tests/cookies/schemeful-same-site/schemeful-iframe-subresource.tentative.html [ Pass Failure ] 1440 imported/w3c/web-platform-tests/cookies/schemeful-same-site/schemeful-navigation.tentative.html [ Pass Failure ] 1441 imported/w3c/web-platform-tests/cookies/schemeful-same-site/schemeful-subresource.tentative.html [ Pass Failure ] 1442 1443 # WPT diff failures that need more investigation 1444 imported/w3c/web-platform-tests/cookies/domain/domain-attribute-host-with-leading-period.sub.https.html [ Failure ] 1445 imported/w3c/web-platform-tests/cookies/encoding/charset.html [ Failure ] 1446 imported/w3c/web-platform-tests/cookies/name/name-ctl.html [ Failure ] 1447 imported/w3c/web-platform-tests/cookies/secure/set-from-dom.sub.html [ Failure ] 1448 imported/w3c/web-platform-tests/cookies/secure/set-from-http.sub.html [ Failure ] 1449 imported/w3c/web-platform-tests/cookies/secure/set-from-ws.sub.html [ Failure ] 1450 imported/w3c/web-platform-tests/cookies/value/value-ctl.html [ Failure ] 1451 imported/w3c/web-platform-tests/cookies/value/value.html [ Failure ] 1452 1453 # Skip WPT tests that timeout 1454 imported/w3c/web-platform-tests/cookies/samesite/form-get-blank-reload.https.html [ Skip ] 1455 imported/w3c/web-platform-tests/cookies/samesite/form-get-blank.https.html [ Skip ] 1456 imported/w3c/web-platform-tests/cookies/samesite/form-post-blank-reload.https.html [ Skip ] 1457 imported/w3c/web-platform-tests/cookies/samesite/form-post-blank.https.html [ Skip ] 1429 1458 1430 1459 ################################################################################ … … 1549 1578 imported/w3c/web-platform-tests/console [ Skip ] 1550 1579 imported/w3c/web-platform-tests/content-security-policy [ Skip ] 1551 imported/w3c/web-platform-tests/cookies [ Skip ]1552 1580 imported/w3c/web-platform-tests/cors [ Skip ] 1553 1581 imported/w3c/web-platform-tests/credential-management [ Skip ] -
trunk/Source/WebCore/ChangeLog
r286993 r287000 1 2021-12-13 Christopher Reid <chris.reid@sony.com> 2 3 [Curl] Improve curl's cookie conformance in WPT 4 https://bugs.webkit.org/show_bug.cgi?id=232722 5 6 Reviewed by Fujii Hironori. 7 8 Fix some cases where CookieJarDB differs from WPT expectations. 9 10 * platform/network/curl/CookieJarDB.cpp: 11 __Secure and __Host prefixes are now stricter. 12 Don't allow empty cookies to be set. 13 * platform/network/curl/CookieUtil.cpp: 14 Empty paths should override previous paths in the cookie list. 15 * platform/network/curl/NetworkStorageSessionCurl.cpp: 16 1 17 2021-12-13 J Pascoe <j_pascoe@apple.com> 2 18 -
trunk/Source/WebCore/platform/network/curl/CookieJarDB.cpp
r284857 r287000 489 489 } 490 490 491 static bool checkSecureCookie(const Cookie& cookie) 492 { 493 if (cookie.name.startsWith("__Secure-"_s) && !cookie.secure) 494 return false; 495 496 // Cookies for __Host must have the Secure attribute, path explicitly set to "/", and no domain attribute 497 if (cookie.name.startsWith("__Host-"_s) && (!cookie.secure || cookie.path != "/"_s || !cookie.domain.isEmpty())) 498 return false; 499 500 return true; 501 } 502 491 503 bool CookieJarDB::canAcceptCookie(const Cookie& cookie, const URL& firstParty, const URL& url, CookieJarDB::Source source) 492 504 { … … 539 551 540 552 auto cookie = CookieUtil::parseCookieHeader(body); 541 if (!cookie) 553 if (!cookie || (cookie->name.isEmpty() && cookie->value.isEmpty())) 554 return false; 555 556 if (!checkSecureCookie(*cookie)) 542 557 return false; 543 558 -
trunk/Source/WebCore/platform/network/curl/CookieUtil.cpp
r284857 r287000 125 125 // the rightmost max-age attribute takes precedence. 126 126 hasMaxAge = true; 127 } else { 128 result.session = true; 129 result.expires = std::nullopt; 127 130 } 128 131 } else if (equalIgnoringASCIICase(attributeName, "expires") && !hasMaxAge) { … … 130 133 result.expires = expiryTime.value(); 131 134 result.session = false; 135 } else if (!hasMaxAge) { 136 result.session = true; 137 result.expires = std::nullopt; 132 138 } 133 139 } else if (equalIgnoringASCIICase(attributeName, "path")) { 134 140 if (!attributeValue.isEmpty() && attributeValue.startsWith('/')) 135 141 result.path = attributeValue; 142 else 143 result.path = emptyString(); 136 144 } 137 145 } -
trunk/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp
r282429 r287000 65 65 if (!cookies.isEmpty()) 66 66 cookies.append("; "); 67 cookies.append(cookie.name); 68 cookies.append("="); 67 if (!cookie.name.isEmpty()) { 68 cookies.append(cookie.name); 69 cookies.append("="); 70 } 69 71 cookies.append(cookie.value); 70 72 } -
trunk/Tools/ChangeLog
r286983 r287000 1 2021-12-13 Christopher Reid <chris.reid@sony.com> 2 3 [Curl] Improve curl's cookie conformance in WPT 4 https://bugs.webkit.org/show_bug.cgi?id=232722 5 6 Reviewed by Fujii Hironori. 7 8 * WebKitTestRunner/TestController.cpp: Use a unique cookie file for each test on windows 9 1 10 2021-12-13 Jean-Yves Avenard <jya@apple.com> 2 11 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r286944 r287000 609 609 WKWebsiteDataStoreConfigurationSetResourceLoadStatisticsDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "ResourceLoadStatistics", pathSeparator, randomNumber)).get()); 610 610 WKWebsiteDataStoreConfigurationSetServiceWorkerRegistrationDirectory(configuration, toWK(makeString(temporaryFolder, pathSeparator, "ServiceWorkers", pathSeparator, randomNumber)).get()); 611 #if PLATFORM(WIN) 612 WKWebsiteDataStoreConfigurationSetCookieStorageFile(configuration, toWK(makeString(temporaryFolder, pathSeparator, "cookies", pathSeparator, randomNumber, pathSeparator, "cookiejar.db")).get()); 613 #endif 611 614 WKWebsiteDataStoreConfigurationSetPerOriginStorageQuota(configuration, 400 * 1024); 612 615 WKWebsiteDataStoreConfigurationSetNetworkCacheSpeculativeValidationEnabled(configuration, true);
Note:
See TracChangeset
for help on using the changeset viewer.