Skip to content

fix: Missing input validation for token scopes#165

Open
mrwind-up-bird wants to merge 2 commits intoSimplyLiz:developfrom
mrwind-up-bird:autofix/b3cf0967/missing-input-validation-for-t
Open

fix: Missing input validation for token scopes#165
mrwind-up-bird wants to merge 2 commits intoSimplyLiz:developfrom
mrwind-up-bird:autofix/b3cf0967/missing-input-validation-for-t

Conversation

@mrwind-up-bird
Copy link
Collaborator

AutoFix: Missing input validation for token scopes

Category: security
Severity: medium

Issue

Token scopes are validated against a predefined list but there's no check for duplicate scopes or case sensitivity handling beyond the initial lowercase conversion. This could lead to inconsistent permission handling.

Fix

The fix adds duplicate scope detection by using a map to track seen scopes. This prevents duplicate scopes from being added to the token while preserving the case-insensitive handling already implemented with strings.ToLower(). The fix is minimal and maintains backward compatibility.


Generated by nyxCore AutoFix

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