[webkit-changes] [WebKit/WebKit] f7bf40: Add a quirk for accounts.google.com for the third ...

Wenson Hsieh noreply at github.com
Mon Sep 25 17:44:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f7bf40970a7b23b55231eb2632e5536177d83ec6
      https://github.com/WebKit/WebKit/commit/f7bf40970a7b23b55231eb2632e5536177d83ec6
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-09-25 (Mon, 25 Sep 2023)

  Changed paths:
    M Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.h
    M Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.mm

  Log Message:
  -----------
  Add a quirk for accounts.google.com for the third party IP cookie expiry capping heuristic
https://bugs.webkit.org/show_bug.cgi?id=262062
rdar://115081644

Reviewed by John Wilander and Charlie Wolfe.

This patch:

1.  Adds a quirk to avoid treating requests to `accounts.google.com` as being from a third party IP
    *only under google.com*, for the purposes of applying 7-day expiry restrictions on incoming
    cookies.

2.  Contains various cleanup around the `NetworkTaskCocoa.mm` file:

    -   Add a missing `namespace WebKit` around the implementation file, and moves the existing
        `using namespace WebCore` behind the WebKit namespace.

    -   Add missing source includes (which are currently not necessary, due to unified sources).

    -   Consistently use `#import` throughout this Cocoa-specific header and implementation file.

* Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.h:
* Source/WebKit/NetworkProcess/cocoa/NetworkTaskCocoa.mm:
(WebKit::NetworkTaskCocoa::applyCookiePolicyForThirdPartyCloaking):

Add the quirk; note that we only need to check the host of the requested URL here, because we only
get to this codepath in the case where the request is already a first party subdomain of google.com.

(computeIsAlwaysOnLoggingAllowed): Deleted.
(NetworkTaskCocoa::NetworkTaskCocoa): Deleted.
(shouldCapCookieExpiryForThirdPartyIPAddress): Deleted.
(NetworkTaskCocoa::shouldApplyCookiePolicyForThirdPartyCloaking const): Deleted.
(NetworkTaskCocoa::statelessCookieStorage): Deleted.
(NetworkTaskCocoa::lastRemoteIPAddress): Deleted.
(NetworkTaskCocoa::lastCNAMEDomain): Deleted.
(NetworkTaskCocoa::needsFirstPartyCookieBlockingLatchModeQuirk const): Deleted.
(NetworkTaskCocoa::applyCookiePolicyForThirdPartyCloaking): Deleted.
(NetworkTaskCocoa::blockCookies): Deleted.
(NetworkTaskCocoa::unblockCookies): Deleted.
(NetworkTaskCocoa::updateTaskWithFirstPartyForSameSiteCookies): Deleted.
(NetworkTaskCocoa::willPerformHTTPRedirection): Deleted.

Canonical link: https://commits.webkit.org/268423@main




More information about the webkit-changes mailing list