Skip to content

Open session in Session::regenerateId() if it is not active yet - #85

Merged
vjik merged 2 commits into
masterfrom
regenerate-id
Aug 26, 2026
Merged

Open session in Session::regenerateId() if it is not active yet#85
vjik merged 2 commits into
masterfrom
regenerate-id

Conversation

@vjik

@vjik vjik commented Aug 25, 2026

Copy link
Copy Markdown
Member
Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fix yiisoft/user#124

@vjik
vjik requested a balanced review from Copilot August 25, 2026 17:01
@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (73475ed) to head (1458736).

Additional details and impacted files
@@             Coverage Diff             @@
##              master       #85   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
+ Complexity        74        73    -1     
===========================================
  Files              3         3           
  Lines            182       182           
===========================================
  Hits             182       182           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes session fixation by opening inactive sessions before regenerating their IDs.

Changes:

  • Opens sessions in regenerateId().
  • Documents and tests the new behavior.
  • Updates the changelog.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Session.php Opens inactive sessions before ID rotation.
src/SessionInterface.php Documents activation behavior.
tests/SessionTest.php Adds inactive-session regression coverage.
CHANGELOG.md Records the bug fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/SessionTest.php Outdated
@vjik
vjik merged commit 817d8aa into master Aug 26, 2026
32 checks passed
@vjik
vjik deleted the regenerate-id branch August 26, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session fixation: regenerateID() is a no-op on login when session is not active

4 participants