Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add storage test for setting a cookie via the cookieStore API in a serviceworker #166

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

sammacbeth
Copy link
Collaborator

  • As the cookieStore API is available in serviceworkers, this can circumvent protections that rely on content-scripts.

@sammacbeth sammacbeth force-pushed the sam/cookiestore-sw-test branch from 27d92cf to b7802ed Compare September 29, 2023 10:29
@sammacbeth sammacbeth force-pushed the sam/cookiestore-sw-test branch from b7802ed to e6ce242 Compare September 29, 2023 10:30
@@ -158,7 +158,7 @@ const commonTests = [
},
extra: () => {
if (window.cookieStore) {
return cookieStore.get('cookiestoredata').then(cookie => {
return cookieStore.get('swcookiestoredata').then(cookie => {
Copy link
Member

@kdzwinel kdzwinel Sep 29, 2023

Choose a reason for hiding this comment

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

I'm confused why we have swcookiestoredata here and cookiestoredata in the file below? Shouldn't that be the other way around? They don't match up with their store/retrive functions now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, I got the cookie names mixed up. Now I've swapped them around.

@kdzwinel
Copy link
Member

@KeaganJarvis are we OK making new changes to this project? Or should we wait with merging as you are still setting things up?

@kdzwinel
Copy link
Member

I'm assuming we are good to merge.

@kdzwinel kdzwinel merged commit 697ea28 into duckduckgo:main Oct 12, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants