Skip to content

fix(lhf-003): prevent self-registration as admin#3352

Open
patchninja-my wants to merge 1 commit into
SecureBananaLabs:mainfrom
patchninja-my:fix/lhf-003-remove-admin-registration
Open

fix(lhf-003): prevent self-registration as admin#3352
patchninja-my wants to merge 1 commit into
SecureBananaLabs:mainfrom
patchninja-my:fix/lhf-003-remove-admin-registration

Conversation

@patchninja-my
Copy link
Copy Markdown

@patchninja-my patchninja-my commented Jun 1, 2026

Fixes

🟠 LHF-003: Registration schema allows self-assignment of admin role

What changed

Removed "admin" from role enum in registerSchema.

Before/After

Before: role: z.enum(["client", "freelancer", "admin"])
After: role: z.enum(["client", "freelancer"])

Bounty Claim

/bounty $100
Wallet: TRON TKaPPxtvKDfMJkset12MzEhrF9hwrtmMPi

Closes #3357

- Remove 'admin' from public registration schema
- Admin role assignment must go through a separate privileged endpoint
- Fixes security issue where any user could gain admin access
github-actions Bot added a commit that referenced this pull request Jun 1, 2026
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.

[LHF-003] Prevent self-registration as admin

1 participant