maxcountryman / tower-sessions

🥠 Sessions as a `tower` and `axum` middleware.
MIT License
253 stars 42 forks source link

ensure id cycling invokes create #188

Closed maxcountryman closed 7 months ago

maxcountryman commented 7 months ago

This fixes a bug where calling cycle_id would invoke the session store save method rather than the create method.

Because cycling the session ID involves creating a new ID, this must follow the same semantics as normal session creation. Therefore prior to this fix session ID collision could occur through this vector.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.49%. Comparing base (6ad8933) to head (c48f77c). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #188 +/- ## ======================================= Coverage 85.49% 85.49% ======================================= Files 5 5 Lines 331 331 ======================================= Hits 283 283 Misses 48 48 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.