Skip to content

Conversation

@piyusshkumar
Copy link

fixes #18957
This PR fixes an issue in PersonController #show where the confirmed query parameter was only checked for presence and not validated.

The controller now restricts confirmed to valid boolean values (true / false).
Any other value results in a 400 Bad Request with a clear error message.

Changes:-

Added strict validation for the confirmed query parameter
Returned a consistent 400 error for invalid values
Added test coverage for valid and invalid confirmed inputs

Why?
This ensures predictable API behavior, prevents unintended queries, and aligns input validation with existing API standards.

Testing

Added integration tests in PersonControllerTest
Verified valid values return success
Verified invalid values return 400 Bad Request

@github-actions github-actions bot added the Frontend Things related to the OBS RoR app label Dec 13, 2025
@piyusshkumar
Copy link
Author

@rubhanazeem Please review the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend Things related to the OBS RoR app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate confirmed Parameter in Person API

1 participant