Fix search in OTP #780

This commit is contained in:
J-Jamet
2020-11-09 10:30:58 +01:00
parent c414fac815
commit 17faee7719
7 changed files with 10 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
KeePassDX(2.9.2)
*
* Fix search in OTP #780
KeePassDX(2.9.1)
* Copy password from generator #697

View File

@@ -431,6 +431,7 @@ class Database {
searchInPasswords = false
searchInUrls = true
searchInNotes = true
searchInOTP = false
searchInOther = true
searchInUUIDs = false
searchInTags = false

View File

@@ -33,6 +33,7 @@ class SearchParameters {
var searchInUrls = true
var searchInGroupNames = false
var searchInNotes = true
var searchInOTP = false
var searchInOther = true
var searchInUUIDs = false
var searchInTags = true
@@ -54,6 +55,7 @@ class SearchParameters {
this.searchInUrls = source.searchInUrls
this.searchInGroupNames = source.searchInGroupNames
this.searchInNotes = source.searchInNotes
this.searchInOTP = source.searchInOTP
this.searchInOther = source.searchInOther
this.searchInUUIDs = source.searchInUUIDs
this.searchInTags = source.searchInTags
@@ -69,6 +71,7 @@ class SearchParameters {
searchInUrls = false
searchInGroupNames = false
searchInNotes = false
searchInOTP = false
searchInOther = false
searchInUUIDs = false
searchInTags = false

View File

@@ -22,6 +22,7 @@ package com.kunzisoft.keepass.database.search.iterator
import com.kunzisoft.keepass.database.element.entry.EntryKDBX
import com.kunzisoft.keepass.database.element.security.ProtectedString
import com.kunzisoft.keepass.database.search.SearchParameters
import com.kunzisoft.keepass.otp.OtpEntryFields
import java.util.*
import kotlin.collections.Map.Entry
@@ -75,6 +76,7 @@ class EntrySearchStringIteratorKDBX(
EntryKDBX.STR_PASSWORD -> mSearchParameters.searchInPasswords
EntryKDBX.STR_URL -> mSearchParameters.searchInUrls
EntryKDBX.STR_NOTES -> mSearchParameters.searchInNotes
OtpEntryFields.OTP_FIELD -> mSearchParameters.searchInOTP
else -> mSearchParameters.searchInOther
}
}

View File

@@ -35,7 +35,7 @@ object OtpEntryFields {
private val TAG = OtpEntryFields::class.java.name
// Field from KeePassXC
private const val OTP_FIELD = "otp"
const val OTP_FIELD = "otp"
// URL parameters (https://github.com/google/google-authenticator/wiki/Key-Uri-Format)
private const val OTP_SCHEME = "otpauth"

View File

@@ -1 +1 @@
*
* Fix search in OTP #780

View File

@@ -1 +1 @@
*
* Correction de la recherche de l'OTP #780