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

Handle cross-origin document.cookie #22479

Closed
chrisbreiding opened this issue Jun 23, 2022 · 2 comments · Fixed by #22594
Closed

Handle cross-origin document.cookie #22479

chrisbreiding opened this issue Jun 23, 2022 · 2 comments · Fixed by #22594
Assignees
Labels
topic: cookies 🍪 topic: cross-origin ⤭ Topics related to cross-origin navigation in tests topic: cy.origin Problems or enhancements related to cy.origin command

Comments

@chrisbreiding
Copy link
Contributor

The cross-origin cookie handling currently handles setting/getting cookies via http requests, but cookie setting/getting in-browser via document.cookie does not work if the AUT is on a different origin than top.

Need to monkey-patch document.cookie and override its setter and getter, so that it simulates what it would do if the AUT was run in the top frame.

@chrisbreiding chrisbreiding self-assigned this Jun 23, 2022
@chrisbreiding chrisbreiding added topic: cookies 🍪 topic: cross-origin ⤭ Topics related to cross-origin navigation in tests topic: cy.origin Problems or enhancements related to cy.origin command experiment: origin labels Jun 23, 2022
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: internal labels Jun 29, 2022
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jun 30, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 30, 2022

The code for this is done in cypress-io/cypress#22594, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 19, 2022

Released in 10.3.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.3.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: cookies 🍪 topic: cross-origin ⤭ Topics related to cross-origin navigation in tests topic: cy.origin Problems or enhancements related to cy.origin command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant