Skip to content

Commit

Permalink
Fix argument parsing for OTP TOTP URL's
Browse files Browse the repository at this point in the history
  • Loading branch information
droidmonkey committed May 31, 2019
1 parent 96b0ea4 commit 6f443ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/totp/totp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ 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())))
.arg(settings->step)
.arg(settings->digits);
QString(Base32::sanitizeInput(settings->key.toLatin1())),
QString::number(settings->step),
QString::number(settings->digits));

if (!settings->encoder.name.isEmpty()) {
urlstring.append("&encoder=").append(settings->encoder.name);
Expand Down

0 comments on commit 6f443ee

Please sign in to comment.