diff options
author | Jonathan White <support@dmapps.us> | 2021-06-09 02:03:07 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2021-06-10 23:48:25 +0300 |
commit | 6422fe5ca5354c99906fde406dff1e28d911bf28 (patch) | |
tree | 79e2887c5064dc4d492847bd4268b1a4a159fdac | |
parent | 9e2399adf4f797d3e76e794b6815de79f26c2bb6 (diff) |
Trim TOTP key input of whitespace prior to processing
* Fixes #6599
-rw-r--r-- | src/gui/TotpSetupDialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/TotpSetupDialog.cpp b/src/gui/TotpSetupDialog.cpp index b350bedc4..1d403a17c 100644 --- a/src/gui/TotpSetupDialog.cpp +++ b/src/gui/TotpSetupDialog.cpp @@ -46,7 +46,7 @@ void TotpSetupDialog::saveSettings() { // Secret key sanity check // Convert user input to all uppercase and remove '=' - auto key = m_ui->seedEdit->text().toUpper().remove(" ").remove("=").toLatin1(); + auto key = m_ui->seedEdit->text().toUpper().remove(" ").remove("=").trimmed().toLatin1(); auto sanitizedKey = Base32::sanitizeInput(key); // Use startsWith to ignore added '=' for padding at the end if (!sanitizedKey.startsWith(key)) { |