From 4437e6a609bfddd6c1e1a0df11bcd9329d29d309 Mon Sep 17 00:00:00 2001 From: dxdc Date: Sat, 9 Nov 2019 22:39:14 -0600 Subject: [PATCH] Encode trailing equal signs from base32 TOTP key Fixes #3255 --- src/totp/totp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/totp/totp.cpp b/src/totp/totp.cpp index c6bad0156..105196fcd 100644 --- a/src/totp/totp.cpp +++ b/src/totp/totp.cpp @@ -152,7 +152,7 @@ QString Totp::writeSettings(const QSharedPointer& settings, auto urlstring = QString("otpauth://totp/%1:%2?secret=%3&period=%4&digits=%5&issuer=%1") .arg(title.isEmpty() ? "KeePassXC" : QString(QUrl::toPercentEncoding(title)), username.isEmpty() ? "none" : QString(QUrl::toPercentEncoding(username)), - QString(Base32::sanitizeInput(settings->key.toLatin1())), + QString(QUrl::toPercentEncoding(Base32::sanitizeInput(settings->key.toLatin1()))), QString::number(settings->step), QString::number(settings->digits));