From e36de1d2eabd547d52c135bdd581b79cfde84014 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 4 Nov 2026 11:43:52 +0100 Subject: fix(app): guard the autofill picker against overlays The picker decides which entry fills the requesting app, so it drops touches under another app's overlay, as the publisher warning does. The entry view now uses cachesPassphrase too, so the cache rule lives in one place, and the publisher warning's app name gets its closing quote. Co-Authored-By: Claude Opus 5.5 --- app/src/main/java/app/passwordstore/ui/autofill/AutofillFilterView.kt | 4 ++++ app/src/main/java/app/passwordstore/ui/entry/EntryViewModel.kt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/app/passwordstore/ui/autofill/AutofillFilterView.kt b/app/src/main/java/app/passwordstore/ui/autofill/AutofillFilterView.kt index 880ab2eb..c607b81f 100644 --- a/app/src/main/java/app/passwordstore/ui/autofill/AutofillFilterView.kt +++ b/app/src/main/java/app/passwordstore/ui/autofill/AutofillFilterView.kt @@ -101,6 +101,10 @@ class AutofillFilterView : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + // The picker decides which entry fills the requesting app: drop touches under an overlay, as + // the + // publisher warning does. + window.decorView.filterTouchesWhenObscured = true setFinishOnTouchOutside(true) val params = window.attributes diff --git a/app/src/main/java/app/passwordstore/ui/entry/EntryViewModel.kt b/app/src/main/java/app/passwordstore/ui/entry/EntryViewModel.kt index 5714f2a6..6296a9b6 100644 --- a/app/src/main/java/app/passwordstore/ui/entry/EntryViewModel.kt +++ b/app/src/main/java/app/passwordstore/ui/entry/EntryViewModel.kt @@ -19,6 +19,7 @@ import app.passwordstore.data.crypto.CryptoRepository import app.passwordstore.data.crypto.PGPPassphraseCache import app.passwordstore.data.passfile.PasswordEntry import app.passwordstore.injection.prefs.SettingsPreferences +import app.passwordstore.ui.autofill.cachesPassphrase import app.passwordstore.util.auth.BiometricAuthenticator.Result as BiometricResult import app.passwordstore.util.coroutines.DispatcherProvider import app.passwordstore.util.extensions.getString @@ -123,7 +124,7 @@ constructor( this.clearCache = clearCache val app = context.applicationContext viewModelScope.launch { - if (decrypt(passphrase, app) && auth is BiometricResult.Success) { + if (decrypt(passphrase, app) && cachesPassphrase(cacheEnabled, auth)) { runCatching { passphraseCache.cachePassphrase(app, ids.first(), passphrase) settings.edit { putBoolean(PreferenceKeys.CLEAR_PASSPHRASE_CACHE, clearCache) } -- cgit v1.2.3