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

fix: correct cookie domain on logout #646

Merged
merged 4 commits into from Sep 1, 2020
Merged

fix: correct cookie domain on logout #646

merged 4 commits into from Sep 1, 2020

Conversation

wezzle
Copy link
Contributor

@wezzle wezzle commented Aug 10, 2020

Related issue

#645

Proposed changes

Checklist

  • I have read the contributing guidelines.
    (Not sure what my commit message should've had as prefix?)
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further comments

@CLAassistant
Copy link

CLAassistant commented Aug 10, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

This influences the global cookie management, which effectively changes e.g. the continuity module behavior. Let's either have a dedicated store for session cookies, or fix this in the logout logic :)

Also, please add at least one failing test case to prevent future regression!

@aeneasr aeneasr self-assigned this Aug 11, 2020
@wezzle
Copy link
Contributor Author

wezzle commented Aug 11, 2020

@aeneasr I've just created a seperate CookieManager for the continuity module. If you'd rather have it the other way around I can refactor it but I had no idea of a good name (sessionSessionStore?)

As for the test perhaps you can guide me in the right direction. As far as I can see it is hard to test cookies with a different domain setting as the server is running on 127.0.0.1 and the http library does not send or accept cookies if the domain does not match. I've tried overriding the cookies using the CookieJar's SetCookies method but inserting a cookie with a different domain does not end up being sent.

@wezzle wezzle changed the title Fix for #645 Correct Cookie Domain on logout fix: correct cookie domain on logout Aug 11, 2020
@wezzle
Copy link
Contributor Author

wezzle commented Aug 17, 2020

@aeneasr I know you're probably busy with the other projects but please let me know if there is anything I can do to get this issue fixed and merged.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Sorry for the long delay on this one, I was very deep into #624 and then we had a company retreat to plan the next milestones.

driver/registry_default.go Show resolved Hide resolved
@aeneasr aeneasr added this to Pending Review in Maintainer's Board via automation Aug 31, 2020
Maintainer's Board automation moved this from Pending Review to Reviewer approved Sep 1, 2020
@aeneasr aeneasr merged commit 6d77e04 into ory:master Sep 1, 2020
Maintainer's Board automation moved this from Reviewer approved to Done Sep 1, 2020
@aeneasr
Copy link
Member

aeneasr commented Sep 1, 2020

Awesome 🎉

Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants