Skip to content

Fix cookie policy fallbacks#2219

Draft
jonathanKingston wants to merge 3 commits intomainfrom
jkt/auto/chosen-policy-undefined-595a
Draft

Fix cookie policy fallbacks#2219
jonathanKingston wants to merge 3 commits intomainfrom
jkt/auto/chosen-policy-undefined-595a

Conversation

@jonathanKingston
Copy link
Copy Markdown
Contributor

@jonathanKingston jonathanKingston commented Jan 30, 2026

Asana Task/Github Issue: #2183

Description

Add robustness to the lack of config within the cookie feature.

Testing Steps

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Medium Risk
Changes defaulting logic for cookie restriction policies; misconfiguration could alter cookie expiry enforcement/allowance behavior in third-party frames, though the change is small and mainly adds safe defaults.

Overview
Improves robustness of CookieFeature when cookie policy config is missing by introducing default policy constants and consistently falling back to them.

load() now uses nullish-coalescing fallbacks when reading bundled config (firstPartyCookiePolicy / firstPartyTrackerCookiePolicy), and init() ensures cookiePolicy.policy and cookiePolicy.trackerPolicy are always populated (using previously-set values or defaults) before resolving the policy promise.

Written by Cursor Bugbot for commit b03be1e. This will update automatically on new commits. Configure here.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 30, 2026

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit fd87cd8
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/697c0678a13c91000803326f
😎 Deploy Preview https://deploy-preview-2219--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 30, 2026

[Beta] Generated file diff

Time updated: Thu, 05 Mar 2026 01:53:05 GMT

Chrome-mv3
    - chrome-mv3/inject.js

File has changed

Firefox
    - firefox/inject.js

File has changed

Integration
    - integration/contentScope.js

File has changed

Windows
    - windows/contentScope.js

File has changed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 1, 2026

Build Branch

Branch pr-releases/jkt/auto/chosen-policy-undefined-595a
Commit b3185dabbd
Updated March 5, 2026 at 1:52:36 AM UTC

Static preview entry points

QR codes (mobile preview)
Entry point QR code
Docs QR for docs preview
Static pages QR for static pages preview
Integration pages QR for integration pages preview

Integration commands

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#pr-releases/jkt/auto/chosen-policy-undefined-595a

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/jkt/auto/chosen-policy-undefined-595a")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/chosen-policy-undefined-595a
git -C submodules/content-scope-scripts checkout origin/pr-releases/jkt/auto/chosen-policy-undefined-595a
Pin to exact commit

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#b3185dabbd99ef37ca81f4557123ebda1a9ab93f

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "b3185dabbd99ef37ca81f4557123ebda1a9ab93f")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/chosen-policy-undefined-595a
git -C submodules/content-scope-scripts checkout b3185dabbd99ef37ca81f4557123ebda1a9ab93f

daxtheduck
daxtheduck previously approved these changes Mar 1, 2026
@daxtheduck daxtheduck dismissed their stale review March 5, 2026 01:52

Dismissing stale approval — new commits pushed, awaiting Cursor re-review.

@github-actions github-actions Bot added the semver-patch Bug fix / internal — no release needed label Mar 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 5, 2026

⚠️ Cursor assessed this PR as Medium Risk (only Low Risk is auto-approved).

This PR requires a manual review and approval from a member of one of the following teams:

  • @duckduckgo/content-scope-scripts-owners
  • @duckduckgo/apple-devs
  • @duckduckgo/android-devs
  • @duckduckgo/team-windows-development
  • @duckduckgo/extension-owners
  • @duckduckgo/config-aor
  • @duckduckgo/breakage-aor
  • @duckduckgo/breakage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch Bug fix / internal — no release needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants