aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-04 11:43:52 +0100
committerDanilo M. <danix@danix.xyz>2026-11-04 11:43:52 +0100
commite36de1d2eabd547d52c135bdd581b79cfde84014 (patch)
treed21030342375846c5a863c18edb3b9ac0d80ca1d /app/src/main/java
parent20164841fdb014afb7752bf0a3f21506fcedb36d (diff)
downloadHardenedPass-e36de1d2eabd547d52c135bdd581b79cfde84014.tar.gz
HardenedPass-e36de1d2eabd547d52c135bdd581b79cfde84014.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/app/passwordstore/ui/autofill/AutofillFilterView.kt4
-rw-r--r--app/src/main/java/app/passwordstore/ui/entry/EntryViewModel.kt3
2 files changed, 6 insertions, 1 deletions
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) }