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 SESSION_COOKIE_PARTITIONED config #5499

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

Josecespedesant
Copy link

This pull request is related to Add support for partitioned session cookies

fixes #5472

Regarding the commit Adding code to handle SESSION_COOKIE_SECURE I see that in the test_basic.py in line 20 is using import flask, I believe this is the reason I got this error as it's using the package installed via pip install flask and not the code contained in /src/flask/

E       AssertionError: assert 'partitioned' in 'session=eyj0zxn0aw5nijo0mn0.zmzhyw.hgj68cffl4hz1avfswp08uya5ya; domain=example.com; secure; path=/; samesite=lax'

I'd like to learn if I'm doing something wrong with this to correct it and modify the PR

  • Test case modified for the behavior of the change
  • Updated relevant docs, based on the appearances of SESSION_COOKIE_SECURE
  • Added entry to CHANGES.rst

@davidism
Copy link
Member

I believe this is the reason I got this error as it's using the package installed via pip install flask and not the code contained in /src/flask/

I'm not sure what you mean here. You should follow our contributing guide to set up your development environment. It instructs you to do pip install -e . during the setup. You can also run tox to set up test envs for you. The failure does not appear to be related.

@Josecespedesant
Copy link
Author

Hello, thank you for your response, I went ahead and applied changes without taking a look at the contribution guide, I just went through it and will make the process correctly, my apologies.

@davidism davidism force-pushed the main branch 3 times, most recently from c27394a to 1ee07fc Compare July 11, 2024 01:39
@davidism
Copy link
Member

So the immediate reason this wouldn't work is because it needs to depend on Werkzeug 3.1, which is not yet released. But after that, you didn't actually use the get_cookie_partitioned method to pass the parameter to set_cookie. I've corrected that, and will merge this once Werkzeug 3.1 is available.

@davidism davidism added this to the 3.1.0 milestone Jul 11, 2024
@davidism davidism marked this pull request as ready for review November 1, 2024 23:22
@davidism davidism changed the title feat: Adding SESSION_COOKIE_PARTITIONED add SESSION_COOKIE_PARTITIONED config Nov 1, 2024
@davidism davidism merged commit ce08bc7 into pallets:main Nov 1, 2024
13 checks passed
@tactipus
Copy link

tactipus commented Nov 7, 2024

is this still open?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for partitioned session cookies
3 participants