mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-03 12:06:25 -04:00
parent
e29cf8bfef
commit
8b8fb9562f
1 changed files with 7 additions and 2 deletions
|
@ -208,8 +208,13 @@ void CsvImportWidget::writeDatabase()
|
||||||
entry->setUrl(m_parserModel->data(m_parserModel->index(r, 4)).toString());
|
entry->setUrl(m_parserModel->data(m_parserModel->index(r, 4)).toString());
|
||||||
entry->setNotes(m_parserModel->data(m_parserModel->index(r, 5)).toString());
|
entry->setNotes(m_parserModel->data(m_parserModel->index(r, 5)).toString());
|
||||||
|
|
||||||
if (m_parserModel->data(m_parserModel->index(r, 6)).isValid()) {
|
auto otpString = m_parserModel->data(m_parserModel->index(r, 6));
|
||||||
auto totp = Totp::parseSettings(m_parserModel->data(m_parserModel->index(r, 6)).toString());
|
if (otpString.isValid() && !otpString.toString().isEmpty()) {
|
||||||
|
auto totp = Totp::parseSettings(otpString.toString());
|
||||||
|
if (totp->key.isEmpty()) {
|
||||||
|
// Bare secret, use default TOTP settings
|
||||||
|
totp = Totp::parseSettings({}, otpString.toString());
|
||||||
|
}
|
||||||
entry->setTotp(totp);
|
entry->setTotp(totp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue