-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
[FIX] Invalid regex on search fields crashes UI #27942
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #27942 +/- ##
===========================================
+ Coverage 41.60% 41.68% +0.08%
===========================================
Files 833 833
Lines 17125 17125
Branches 2068 2068
===========================================
+ Hits 7124 7138 +14
+ Misses 9729 9708 -21
- Partials 272 279 +7
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Is there a possibility we could use
import { escapeRegExp } from '@rocket.chat/string-helpers';
instead of testing the regex? I think this would ensure no regex would break ever...
I agree with @gabriellsh , there is a setting that you can change the accepted chars in the username, because of that we don't have to restrict the search for certain chars. |
Problem to be solved
Admin -> Workspace -> Users
entering?
or another invalid regular expression into the search blank crashes the UI instantly.Other Admin pages with Regex searches have shown the same error:
Acceptance criteria
These search fields should accept valid RegEx and regular text, but showing an error message when an invalid input is given.
TC-418 TC-384