Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan White <support@dmapps.us>2021-06-09 02:03:07 +0300
committerJonathan White <support@dmapps.us>2021-06-10 23:48:25 +0300
commit6422fe5ca5354c99906fde406dff1e28d911bf28 (patch)
tree79e2887c5064dc4d492847bd4268b1a4a159fdac
parent9e2399adf4f797d3e76e794b6815de79f26c2bb6 (diff)
Trim TOTP key input of whitespace prior to processing
* Fixes #6599
-rw-r--r--src/gui/TotpSetupDialog.cpp2
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)) {