-
Notifications
You must be signed in to change notification settings - Fork 354
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description:
The current username validation regex /[0-9a-zA-Z-_.]+/ in EmbeddedChatApi.ts lacks start (^) and end ($) anchors. This causes the validation to pass for any string that contains at least one valid character, even if the rest of the string is invalid.
Steps to reproduce:
- Call
updateUserUsername(userid, "@#$a@#$"). - Observe that
usernameRegExp.test(newUserName)returnstruebecause it matches the character "a". - The method proceeds to attempt an update with an invalid username format.
Expected behavior:
The validation should fail if the string contains any characters outside the allowed set [0-9a-zA-Z-_.].
Actual behavior:
The validation passes if at least one character in the string matches the regex.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working