Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 891455d

Browse files
committed
fix: gate passphrase cache behind authenticator availability
Fixes #2783
1 parent 9b7175a commit 891455d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/src/main/java/app/passwordstore/ui/settings/PGPSettings.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package app.passwordstore.ui.settings
88
import androidx.fragment.app.FragmentActivity
99
import app.passwordstore.R
1010
import app.passwordstore.ui.pgp.PGPKeyListActivity
11+
import app.passwordstore.util.auth.BiometricAuthenticator
1112
import app.passwordstore.util.extensions.launchActivity
1213
import app.passwordstore.util.features.Feature
1314
import app.passwordstore.util.settings.PreferenceKeys
@@ -33,6 +34,7 @@ class PGPSettings(private val activity: FragmentActivity) : SettingsProvider {
3334
persistent = true
3435
}
3536
switch(Feature.EnablePGPPassphraseCache.configKey) {
37+
enabled = BiometricAuthenticator.canAuthenticate(activity)
3638
titleRes = R.string.pref_passphrase_cache_title
3739
summaryRes = R.string.pref_passphrase_cache_summary
3840
defaultValue = false

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<string name="pref_pgp_key_manager_title">Key manager</string>
137137
<string name="pref_pgp_ascii_armor_title">Encrypt in ASCII armor mode</string>
138138
<string name="pref_passphrase_cache_title">Enable passphrase caching</string>
139-
<string name="pref_passphrase_cache_summary">WARNING: this feature is functional but very experimental.</string>
139+
<string name="pref_passphrase_cache_summary">WARNING: this feature is functional but very experimental. Requires an active screen lock.</string>
140140

141141
<!-- PasswordGenerator fragment -->
142142
<string name="pwgen_title">Generate Password</string>

0 commit comments

Comments
 (0)