fix: validate roles in VerifyEmail HTTP handler by lakhansamani · Pull Request #497 · authorizerdev/authorizer
Navigation Menu
{{ message }}
authorizerdev / authorizer Public
- Notifications You must be signed in to change notification settings
- Fork 204
Merged
lakhansamani merged 3 commits intomainfrom
Mar 1, 2026Merged
fix: validate roles in VerifyEmail HTTP handler#497
lakhansamani merged 3 commits intomainfrom
fix: validate roles in VerifyEmail HTTP handler#497
lakhansamani merged 3 commits intomainfrom
Conversation
Copy link Copy Markdown
Contributor
lakhansamani
commented
Mar 1, 2026
lakhansamani
commented
Summary
- Added role validation for
?roles=query parameter in VerifyEmail HTTP handler - Roles are now checked against user's stored roles using
validators.IsValidRoles() - Prevents privilege escalation via URL manipulation
Test plan
- Verify email verification with no roles param works (uses user's stored roles)
- Verify email verification with valid roles subset works
- Verify email verification with unauthorized roles returns 400
Fixes #486
lakhansamani added 3 commits
March 1, 2026 11:54Roles from the query string were used without validation against the user's stored roles, allowing privilege escalation via URL manipulation. Fixes #486
lakhansamani
merged commit
6486586
into
main
lakhansamani
deleted the
fix/verify-email-handler-role-validation
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment