fix: don't trim entered passwords

pull/3206/head
Audric Ackermann 1 year ago
parent 2dcacb3932
commit 68a1953389

@ -343,10 +343,11 @@ export class SessionSetPasswordDialog extends Component<Props, State> {
const { currentPasswordEntered, currentPasswordConfirmEntered, currentPasswordRetypeEntered } = const { currentPasswordEntered, currentPasswordConfirmEntered, currentPasswordRetypeEntered } =
this.state; this.state;
// Trim leading / trailing whitespace for UX // Note: don't trim anything. If the user entered a space as a first/last
const firstPasswordEntered = (currentPasswordEntered || '').trim(); // char and saved it as is in his password manager, so be it.
const secondPasswordEntered = (currentPasswordConfirmEntered || '').trim(); const firstPasswordEntered = currentPasswordEntered || '';
const thirdPasswordEntered = (currentPasswordRetypeEntered || '').trim(); const secondPasswordEntered = currentPasswordConfirmEntered || '';
const thirdPasswordEntered = currentPasswordRetypeEntered || '';
switch (passwordAction) { switch (passwordAction) {
case 'set': { case 'set': {

Loading…
Cancel
Save