You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user is changing his password (SettingsSecurityForm.tsx) and enters a space, it will not be in the value but no error message is displayed that it's an invalid character.
This can result in a user setting a password with spaces in it like "some random sentence" which will result that he actually changed his password to "somerandomsentence" without seeing it. As he can enter that phase with spaces in the confirmation as well and they will match, he will only figure out that he can not login anymore with that password after it has been updated.
If however he copy pastes into the password field, a space character is possible so I'm not sure if the bug is not showing an error message or trimming on every change of the field.
The text was updated successfully, but these errors were encountered:
rac2030
changed the title
Password with spaces silently removes them when changing a password
When changing a password, it silently trims space characters from inside on every value change trigger
Jan 9, 2023
From my understanding of a quick look at the code without cloning or building it looks to me that the problem is with the on Change listener that trims which is added to the password field on the settings page:
Created a PR removing the OnChange listener as after further inspection of the code base it seems that other forms in coder that set the user password all have no OnChange listener set for the password fields
If a user is changing his password (SettingsSecurityForm.tsx) and enters a space, it will not be in the value but no error message is displayed that it's an invalid character.
This can result in a user setting a password with spaces in it like "some random sentence" which will result that he actually changed his password to "somerandomsentence" without seeing it. As he can enter that phase with spaces in the confirmation as well and they will match, he will only figure out that he can not login anymore with that password after it has been updated.
If however he copy pastes into the password field, a space character is possible so I'm not sure if the bug is not showing an error message or trimming on every change of the field.
The text was updated successfully, but these errors were encountered: