Encode trailing equal signs from base32 TOTP key

Fixes #3255
This commit is contained in:
dxdc 2019-11-09 22:39:14 -06:00 committed by Jonathan White
parent 7659bbb711
commit 4437e6a609

View File

@ -152,7 +152,7 @@ QString Totp::writeSettings(const QSharedPointer<Totp::Settings>& 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));