flask icon indicating copy to clipboard operation
flask copied to clipboard

feat: Adding SESSION_COOKIE_PARTITIONED

Open Josecespedesant opened this issue 1 year ago • 3 comments
trafficstars

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

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

Josecespedesant avatar Jun 10 '24 02:06 Josecespedesant

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.

davidism avatar Jun 10 '24 17:06 davidism

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.

Josecespedesant avatar Jun 10 '24 19:06 Josecespedesant

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 avatar Jul 11 '24 01:07 davidism

is this still open?

tactipus avatar Nov 07 '24 22:11 tactipus