Skip to content

Validate session routes consistently - #1797

Merged
gherceg merged 5 commits into
masterfrom
gh/session-ownership-check
Oct 7, 2026
Merged

gherceg merged 5 commits into
masterfrom
gh/session-ownership-check

Conversation

@gherceg

@gherceg gherceg commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Technical Summary

Adds consistent validation on routes that operate on an existing form session.

Safety Assurance

Safety story

No change to normal usage, including public forms. Covered by new unit and integration tests.

Automated test coverage

SessionOwnershipAspectTest, SessionOwnershipAspectIntegrationTest, SessionOwnershipWiringTest.

QA Plan

Not requesting QA.

Special deploy instructions

  • This PR can be deployed after merge with no further considerations.

Rollback instructions

  • This PR can be reverted after deploy with no further considerations.

Review

  • The set of people pinged as reviewers is appropriate for the level of risk of the change.

🤖 Generated with Claude Code

Formplayer resolves form sessions by primary key alone and does not
check that the authenticated caller owns the session. Any
authenticated user could read and attempt to modify another user's
session given only its id.
Apply @ValidateSessionOwner to every route that resolves a form
session by id.
Adds test to assert that every controller route that takes a
SessionRequestBean carries @ValidateSessionOwner.
Every route in PUBLIC_SESSION_ALLOWED_URLS that takes a
SessionRequestBean must carry the UserRestore annotation.
@gherceg
gherceg marked this pull request as ready for review October 7, 2026 20:27
@gherceg
gherceg requested a review from dannyroberts October 7, 2026 20:27
@gherceg
gherceg merged commit ae62478 into master Oct 7, 2026
4 checks passed
@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.34%. Comparing base (24383ac) to head (5088b09).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...are/formplayer/aspects/SessionOwnershipAspect.java 91.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1797      +/-   ##
============================================
+ Coverage     72.25%   72.34%   +0.08%     
- Complexity     2149     2161      +12     
============================================
  Files           261      262       +1     
  Lines          8147     8172      +25     
  Branches        797      802       +5     
============================================
+ Hits           5887     5912      +25     
  Misses         1968     1968              
  Partials        292      292              

☔ 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.

@gherceg
gherceg deleted the gh/session-ownership-check branch October 7, 2026 20:31
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.

2 participants