mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
feat: OTP tag #2122
This commit is contained in:
@@ -6,7 +6,7 @@ KeePassDX(4.2.0)
|
||||
* Change Passkey Backup Eligibility & Backup State #2135 #2150
|
||||
* Search settings #2112 #2181 #2187
|
||||
* Autofill refactoring #765
|
||||
* Small fixes #2157 #2164 #2171
|
||||
* Small fixes #2157 #2164 #2171 #2122
|
||||
|
||||
KeePassDX(4.1.9)
|
||||
* Fix landscape UI #2198 #2200 (@chenxiaolong)
|
||||
|
||||
@@ -40,6 +40,7 @@ object OtpEntryFields {
|
||||
|
||||
// Field from KeePassXC
|
||||
private const val OTP_FIELD = "otp"
|
||||
private const val OTP_TAG = "OTP"
|
||||
|
||||
// URL parameters (https://github.com/google/google-authenticator/wiki/Key-Uri-Format)
|
||||
private const val OTP_SCHEME = "otpauth"
|
||||
@@ -438,13 +439,14 @@ object OtpEntryFields {
|
||||
fun EntryInfo.setOtp(otpString: String): Boolean {
|
||||
// Replace the OTP field
|
||||
parseOTPUri(otpString)?.let { otpElement ->
|
||||
tags.put(OTP_TAG)
|
||||
if (title.isEmpty())
|
||||
title = otpElement.issuer
|
||||
if (username.isEmpty())
|
||||
username = otpElement.name
|
||||
// Add OTP field
|
||||
val mutableCustomFields = customFields as ArrayList<Field>
|
||||
val otpField = OtpEntryFields.buildOtpField(otpElement, null, null)
|
||||
val otpField = buildOtpField(otpElement, null, null)
|
||||
if (mutableCustomFields.contains(otpField)) {
|
||||
mutableCustomFields.remove(otpField)
|
||||
}
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
* Search settings #2112 #2181
|
||||
* Setting to close database after a Passkey selection #2187
|
||||
* Autofill refactoring #765
|
||||
* Small fixes #2171 #2150 #2159
|
||||
* Small fixes #2171 #2150 #2159 #2122
|
||||
@@ -2,4 +2,4 @@
|
||||
* Paramètres de recherche #2112 #2181
|
||||
* Paramètre de fermeture de la base après une sélection de Passkey #2187
|
||||
* Refonte du remplissage automatique #765
|
||||
* Petites corrections #2171 #2150 #2159
|
||||
* Petites corrections #2171 #2150 #2159 #2122
|
||||
Reference in New Issue
Block a user