fix: Require at least one alphanumeric char in workspace name#9263
fix: Require at least one alphanumeric char in workspace name#9263okxint wants to merge 1 commit into
Conversation
`COMPANY_NAME_REGEX` blocks disallowed chars but accepts symbol-only strings like `-_________-` since `-` and `_` are in the allowed set. Add `HAS_ALPHANUMERIC_REGEX` and check it in `validateWorkspaceName` and `validateCompanyName` so inputs with no letter or digit are rejected. Fixes makeplane#9255 Signed-off-by: okxint <cashmein.eth@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a new exported regex constant ChangesAlphanumeric validation for company and workspace names
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
COMPANY_NAME_REGEXonly blocks disallowed characters — it never checks that the name actually contains a letter or digit. So names like-_________-or---pass validation cleanly.Added a second check using
\p{L}\p{N}(Unicode-aware) in bothvalidateCompanyNameandvalidateWorkspaceName. International names (Japanese, Arabic, accented chars) still pass fine since\p{L}covers all Unicode letters.Closes #9255
Summary by CodeRabbit