mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PM-739] Using a space at the beginning of otpauth:// generate a wrong OTP (#11204)
* Trimmed tariling whitespace from totp field * Trimmed tariling whitespace from totp field * Fix failing test
This commit is contained in:
@@ -329,6 +329,11 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.cipher.card.expYear = normalizeExpiryYearFormat(this.cipher.card.expYear);
|
||||
}
|
||||
|
||||
// trim whitespace from the TOTP field
|
||||
if (this.cipher.type === this.cipherType.Login && this.cipher.login.totp) {
|
||||
this.cipher.login.totp = this.cipher.login.totp.trim();
|
||||
}
|
||||
|
||||
if (this.cipher.name == null || this.cipher.name === "") {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
|
||||
Reference in New Issue
Block a user