-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App allows '÷×' symbols in legal name even though error states that 'Name can only include letters' #25615
Conversation
@robertKozik Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Hi @robertKozik, Thank you for your time. Considering the current code is using |
@Pluto0104 Do we allow them until now? |
@robertKozik No, we only allowed |
@robertKozik so should we add them |
Sorry I went OOO for today, I'll come back to this PR tommorow. But basically I would stick to the behaviour we have until now
So i believe tour current changes are sufficient right? |
@robertKozik that's correct. thank you for your time. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromeandroid.web.movMobile Web - Safariios.web.movDesktopdesktop.moviOSiOS.-.native.movAndroidandroid.-.native.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, let's push it forward
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.57-0 🚀
|
I reported a similar bug a month ago. It was about using numbers in legal names. The error says 'only letters'. Is it okay if it includes numbers? |
This caused a regression: https://expensify.slack.com/archives/C049HHMV9SM/p1691943529706359 |
@madmax330 the issue from slack is 11 days old - this PR was deployed on staging 4 hours ago. Are you sure this one caused it? |
Good point, maybe this one? https://github.com/Expensify/App/pull/23650/files although not sure how that would cause a regression |
I'm not sure tbh, last change before the pull you provided is actually from the PR which fixes the Spanish characters. But I think we have never supported non-latin chars (only latin with diacritics - for example the Spanish ones are working fine) - the video from the slack issue uses the Chinese characters which are not supported in regex even before the PR. |
You're right - @robertKozik. Even before this PR, we have never supported other characters except Latin and alphabetic ones. And current PR actually removed non-Latin characters such as |
Cool, thanks guys |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.58-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.57-6 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.58-5 🚀
|
I have read the CLA Document and I hereby sign the CLA
Details
The application currently allows the use of the symbols
÷
and×
in the legal name field, which is not intended. This behavior is caused by theALPHABETIC_AND_LATIN_CHARS
regular expression in the codebase. This regular expression includes the Latin character rangeÀ-ÿ
, which unintentionally includes the×
and÷
symbols.To address this issue, I suggest modifying the following constants:
The updated
ALPHABETIC_AND_LATIN_CHARS
regular expression matches any string that consists of one or more characters from the Latin script. TheNON_ALPHABETIC_AND_NON_LATIN_CHARS
regular expression matches any character that is not a Latin character.Fixed Issues
$ #24508
PROPOSAL: #24508 (comment)
Tests
÷
or×
. If you are using a web browser, you can copy and paste the characters from another source. For mobile devices, switch the keyboard to the number keypad to access these symbols.÷
and×
symbols in the legal name field is not permitted.Offline tests
÷
or×
. If you are using a web browser, you can copy and paste the characters from another source. For mobile devices, switch the keyboard to the number keypad to access these symbols.÷
and×
symbols in the legal name field is not permitted.QA Steps
÷
or×
. If you are using a web browser, you can copy and paste the characters from another source. For mobile devices, switch the keyboard to the number keypad to access these symbols.PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android