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: clear session cookie if new session gt CHUNK_SIZE #3446

Merged
merged 3 commits into from
Apr 28, 2024

Conversation

peterschutt
Copy link
Contributor

Fix an issue where the connection session cookie is not cleared if the response session is stored across multiple cookies.

Closes #3441

Description

Closes

Copy link

codecov bot commented Apr 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.29%. Comparing base (cc6d55b) to head (4aaa2cd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3446      +/-   ##
==========================================
+ Coverage   98.27%   98.29%   +0.01%     
==========================================
  Files         328      328              
  Lines       14852    14857       +5     
  Branches     2357     2356       -1     
==========================================
+ Hits        14596    14603       +7     
+ Misses        117      116       -1     
+ Partials      139      138       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

litestar/middleware/session/client_side.py Outdated Show resolved Hide resolved
peterschutt and others added 3 commits April 28, 2024 18:42
Fix an issue where the connection session cookie is not cleared if the response session is stored across multiple cookies.

Closes #3441
Co-authored-by: Jacob Coffee <jacob@z7x.org>
@peterschutt peterschutt enabled auto-merge (squash) April 28, 2024 08:46
@peterschutt peterschutt merged commit 0670551 into main Apr 28, 2024
26 checks passed
@peterschutt peterschutt deleted the 3441-fix-clear-session branch April 28, 2024 08:48
Copy link

sonarcloud bot commented Apr 28, 2024

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3446

peterschutt added a commit that referenced this pull request May 1, 2024
* fix: clear session cookie if new session gt CHUNK_SIZE

Fix an issue where the connection session cookie is not cleared if the response session is stored across multiple cookies.

Closes #3441

* Update litestar/middleware/session/client_side.py

Co-authored-by: Jacob Coffee <jacob@z7x.org>

* refactor: use dataclass utils to iterate over Cookie fields

---------

Co-authored-by: Jacob Coffee <jacob@z7x.org>
(cherry picked from commit 0670551)
peterschutt added a commit that referenced this pull request May 2, 2024
* fix: clear session cookie if new session gt CHUNK_SIZE

Fix an issue where the connection session cookie is not cleared if the response session is stored across multiple cookies.

Closes #3441

* Update litestar/middleware/session/client_side.py

Co-authored-by: Jacob Coffee <jacob@z7x.org>

* refactor: use dataclass utils to iterate over Cookie fields

---------

Co-authored-by: Jacob Coffee <jacob@z7x.org>
(cherry picked from commit 0670551)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Some session data got lost when trying to set session with big payload
4 participants