Skip to content

Regenerate session id after login#668

Open
darshan-Jahagirdar wants to merge 1 commit into
ryanhowdy:masterfrom
darshan-Jahagirdar:codex/regenerate-session-on-login
Open

Regenerate session id after login#668
darshan-Jahagirdar wants to merge 1 commit into
ryanhowdy:masterfrom
darshan-Jahagirdar:codex/regenerate-session-on-login

Conversation

@darshan-Jahagirdar
Copy link
Copy Markdown

Fixes #537.

This mitigates session fixation by regenerating the PHP session ID after the user credentials have been accepted and the login token has been saved, before writing the authenticated fcms_id / fcms_token values into $_SESSION.

Bounty: targets the $15 Bountysource bounty linked from #537.

Verification:

  • D:\income-bounty-work\tools\php-8.4.21\php.exe -l familyconnections\inc\utils.php
  • git diff --cached --check passed before commit.

Note: I could not run the legacy Test-More harness on this Windows/PHP 8.4 setup because the bundled tests/lib/test-more.php uses $this as a function parameter, which PHP 8 rejects before tests can run.

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 614 complexity · 0 duplication

Metric Results
Complexity 614
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

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 Vulnerability [$15]

1 participant