mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
Trim whitespace from 2FA input before validation (#28616)
This commit is contained in:
@@ -137,7 +137,7 @@ export class CloudStepSignin extends LitElement {
|
|||||||
),
|
),
|
||||||
});
|
});
|
||||||
if (totpCode !== null && totpCode !== "") {
|
if (totpCode !== null && totpCode !== "") {
|
||||||
await doLogin(username, totpCode);
|
await doLogin(username, totpCode.trim());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export class CloudLogin extends LitElement {
|
|||||||
),
|
),
|
||||||
});
|
});
|
||||||
if (totpCode !== null && totpCode !== "") {
|
if (totpCode !== null && totpCode !== "") {
|
||||||
this._login(email, password, checkConnection, totpCode);
|
this._login(email, password, checkConnection, totpCode.trim());
|
||||||
return "continue";
|
return "continue";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user