fix: allow apostrophes in validatePersonName and unit tests - #9667
fix: allow apostrophes in validatePersonName and unit tests#9667UGilfoyle wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughChangesValidation updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change allows legitimate apostrophes in person names while retaining the existing blocked-character checks. It is a localized update with passing tests and workspace checks, so no actionable merge-blocking risk remains after normal review. 🚥 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 |
Description
Fixed an issue in
validatePersonNamewhere legitimate names with apostrophes (e.g.O'Brien,D'Angelo,O'Connor,N'Golo) were rejected by validation due to single quotes triggeringhasInjectionRiskChars.{ allowApostrophe?: boolean }parameter tohasInjectionRiskChars.validatePersonNameto explicitly allow apostrophes while continuing to block dangerous injection vectors (< > " { } [ ] * ^ ! # %).@plane/utils.Type of Change
Screenshots and Media (if applicable)
N/A (Utility logic & validation fix)
Test Scenarios
packages/utils/tests/validation.test.tscovering:John,Jane Doe,Jean-Paul).O'Brien,D'Angelo,O'Connor,N'Golo,D'Souza).José,Müller,李明,محمد,Александр).John<script>,John{admin},John*).pnpm --filter=@plane/utils test(18/18 passed).pnpm turbo run check:types check:lint check:format(All 60 tasks passed).References
N/A
Summary by CodeRabbit
Bug Fixes
Tests