Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(validator): 🐛 fix isUUIDv4() regex to include lowercase letters. … #424

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

brandon-mason
Copy link
Contributor

… validator.ts lines 302-303

Copy link
Owner

@JamesNZL JamesNZL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!

@JamesNZL JamesNZL added the bug Something isn't working label Oct 22, 2024
@JamesNZL JamesNZL merged commit 5da8b4a into JamesNZL:main Oct 22, 2024
1 check passed
@JamesNZL
Copy link
Owner

Triaging — the issue isn't lowercase letters... the regex has the /i flag so was using a case-insensitive match already, the real fix was changing

- 4[0-9A-F]{3}
+ [0-9a-fA-F]{4}

It looks like Notion https://developers.notion.com/reference/database doesn't actually use standard UUIDv4s (at least not anymore?) — eg a problematic database ID is 103c76e1-69f5-800b-b02c-f0ab86a77e45, which does not conform to v4

@JamesNZL
Copy link
Owner

Fixed in v5.0.4

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants