Skip to content

fix(privacy): Shred private WKWebsiteDataStore data types - #26199

Merged
StephenHeaps merged 2 commits into
masterfrom
privacy/shred-private-data-types
Oct 24, 2024
Merged

StephenHeaps merged 2 commits into
masterfrom
privacy/shred-private-data-types

Conversation

@StephenHeaps

Copy link
Copy Markdown
Collaborator
  • Add some of the private WKWebsiteDataStore types to Shred.

Resolves brave/brave-browser#41863

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@StephenHeaps StephenHeaps added CI/skip-android Do not run CI builds for Android CI/skip-macos-x64 CI/skip-windows-x64 Do not run CI builds for Windows x64 CI/skip-macos-arm64 Do not run CI builds for macOS arm64 labels Oct 24, 2024
@StephenHeaps StephenHeaps self-assigned this Oct 24, 2024
@StephenHeaps
StephenHeaps requested a review from a team as a code owner October 24, 2024 15:44
// https://github.com/WebKit/WebKit/blob/b66e4895df40202b14bb20fb47444c3e0a3c164e/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h
var types = WKWebsiteDataStore.allWebsiteDataTypes()
types.insert("_WKWebsiteDataTypeHSTSCache")
types.insert("_WKWebsiteDataTypeMediaKeys")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On iOS 17+ this is already included in the allWebsiteDataTypes list, only needs to be added if 17 is not available (relevant info: WebKit/WebKit@560341f, https://developer.apple.com/documentation/webkit/wkwebsitedatatypemediakeys)

types.insert("_WKWebsiteDataTypeAdClickAttributions")
types.insert("_WKWebsiteDataTypePrivateClickMeasurements")
types.insert("_WKWebsiteDataTypeAlternativeServices")
return types

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want to also include _WKWebsiteDataTypeFileSystem and _WKWebsiteDataTypeSearchFieldRecentSearches for users not on iOS 17?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WKWebsiteDataTypeFileSystem is iOS 16+: https://developer.apple.com/documentation/webkit/wkwebsitedatatypefilesystem
I thought WKWebsiteDataTypeSearchFieldRecentSearches was iOS 16+ too, but I'll update to include for iOS 16 users (along with only adding _WKWebsiteDataTypeMediaKeys for iOS 16).

@StephenHeaps
StephenHeaps force-pushed the privacy/shred-private-data-types branch from 697ace7 to e6a9f58 Compare October 24, 2024 17:29
@StephenHeaps
StephenHeaps merged commit e55d4f3 into master Oct 24, 2024
@StephenHeaps
StephenHeaps deleted the privacy/shred-private-data-types branch October 24, 2024 22:25
@github-actions github-actions Bot added this to the 1.73.x - Nightly milestone Oct 24, 2024
brave-builds added a commit that referenced this pull request Oct 24, 2024
brave-builds added a commit that referenced this pull request Oct 24, 2024
@brave-builds

Copy link
Copy Markdown
Collaborator

Released in v1.73.47

kjozwiak pushed a commit that referenced this pull request Oct 25, 2024
kjozwiak pushed a commit that referenced this pull request Oct 25, 2024
@bsclifton bsclifton modified the milestones: 1.73.x - Nightly, 1.74.x - Nightly Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/skip-android Do not run CI builds for Android CI/skip-macos-arm64 Do not run CI builds for macOS arm64 CI/skip-windows-x64 Do not run CI builds for Windows x64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clearing private Website Data Types when Shredding

5 participants