Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.29k stars 260 forks source link

Database does not auto lock itself after usieing it #1777

Open hetszunyukapanyanyimonyok opened 3 months ago

hetszunyukapanyanyimonyok commented 3 months ago

Describe the bug

Lock - Timeout settings does not work. The database stays open. (The auto lock time is set to 30 sec.)

To Reproduce

Steps to reproduce the behavior:

  1. Login in my browser in a random site
  2. I chose my login username.
  3. The database does not lock automatically

Expected behavior

To close after the set 30 seconds.

KeePassDX:

Android:

Additional context

cbiere commented 3 months ago

If you configure the timeout for the magic keyboard, KeePassDX should ask for an additional permission to schedule alarms. Maybe this permission is necessary even if you refer to the autofill function instead of the magic keyboard.

hetszunyukapanyanyimonyok commented 3 months ago

@cbiere Thanks for trying to help! KeepassDx does not ask for any permission on Android 11.(From FDroid)

J-Jamet commented 3 months ago

Strangely enough, this behavior works well on my test devices. The time is approximate depending on the devices to save battery, so there could be several seconds of lag but should still work.

cbiere commented 3 months ago

I believe this happens occasionally on Android 14, actually. A few days ago I saw the notification showing "18 minutes ago" and database was indeed still unlocked even though I've set a timeout of one minute. After locking my smartphone, the database got locked eventually. I cannot reproduce this at will and most of the time it just works.

hetszunyukapanyanyimonyok commented 3 months ago

As @J-Jamet mentioned that it happens occasionally I thought about it and yes sometimes it works on current build sometimes not.

So I tested it:

  1. Opening app from "desktop" and logging in.

    • Database closed itself after the set 30 sec
  2. Opening database from browser with magic-keyboard shortcut(long click space...) Logging in.

    • Database does NOT closes itself.
J-Jamet commented 2 months ago

@hetszunyukapanyanyimonyok In case number 2 it's normal, KeePassDX knowingly disables auto logout to prevent bugs. In special modes, such as selection, the program waits for the user's action to get the return response, then exit this mode and reactivate auto logout.

hetszunyukapanyanyimonyok commented 2 months ago

@J-Jamet Thanks for the answer, I will test it and report how did it work.