mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Better block list algorithm
This commit is contained in:
@@ -49,12 +49,20 @@ class KeeAutofillService : AutofillService() {
|
||||
// Build search info only if applicationId or webDomain are not blocked
|
||||
var searchAllowed = true
|
||||
parseResult.applicationId?.let {
|
||||
if (PreferencesUtil.applicationIdBlocklist(this).contains(it))
|
||||
if (PreferencesUtil.applicationIdBlocklist(this).any { appIdBlocked ->
|
||||
it.contains(appIdBlocked)
|
||||
}
|
||||
) {
|
||||
searchAllowed = false
|
||||
}
|
||||
}
|
||||
parseResult.domain?.let {
|
||||
if (PreferencesUtil.webDomainBlocklist(this).contains(it))
|
||||
if (PreferencesUtil.webDomainBlocklist(this).any { webDomainBlocked ->
|
||||
it.contains(webDomainBlocked)
|
||||
}
|
||||
) {
|
||||
searchAllowed = false
|
||||
}
|
||||
}
|
||||
|
||||
if (searchAllowed) {
|
||||
|
||||
Reference in New Issue
Block a user