Repository navigation
fix(supabase_common): accept uppercase and mixed-case UUIDs in validation - #1656
Merged
Merged
Conversation
…tion UUIDs are case-insensitive per RFC 9562/4122, but the validation regex only matched lowercase hexadecimal characters, so uppercase identifiers returned by external identity providers or databases were rejected.
Contributor
📝 WalkthroughWalkthroughThe UUID regular expression now accepts uppercase and mixed-case hexadecimal characters. Tests cover uppercase and mixed-case inputs for both ChangesUUID validation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
grdsdev
approved these changes
Aug 6, 2026
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uuidRegexinpackages/supabase_common/lib/src/uuid.dartonly matched lowercase hexadecimal characters, sovalidateUuidrejected otherwise valid uppercase or mixed-case UUID strings. UUIDs are case-insensitive per RFC 9562/4122, and such identifiers are commonly returned by external identity providers and databases.This affects
GoTrueAdminOAuthApi.getClient,updateClient,deleteClientandregenerateClientSecret, which validate the client id before issuing the request.Changes
packages/supabase_common/lib/src/uuid.dart— passcaseSensitive: falseto the UUIDRegExp.packages/gotrue/test/src/helper_test.dart— flip the uppercase test from rejecting to accepting, add a mixed-case case, and update theuuidRegexcase test. Non-hexadecimal characters such asGare still rejected.Outcome
Implemented.
Reference
Fixes #1649
Compliance matrix
No change needed. The fix is internal to an existing helper and adds no public symbols; the capabilities it affects (
auth.oauth_admin.get_client,auth.oauth_admin.update_client,auth.oauth_admin.delete_client,auth.oauth_admin.regenerate_client_secret) are alreadyimplementedinsdk-compliance.yaml.Summary by CodeRabbit
SDK-1424