Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database is immediately changed after open #11516

Open
varjolintu opened this issue Nov 30, 2024 · 6 comments
Open

Database is immediately changed after open #11516

varjolintu opened this issue Nov 30, 2024 · 6 comments

Comments

@varjolintu
Copy link
Member

varjolintu commented Nov 30, 2024

Overview

Regression from #11410. The database looks like it has been changed right after it has been opened. I'm not using Touch-ID which the PR is related to.

I don't have any Touch ID hardware connected to the computer, but if the Touch ID / Quick Unlock feature is enabled in KeePassXC settings, Database::publicUuid() triggers the change. The only unlock option I have is the default database input.

Also checked that the context.biometryType returned by canEvaluatePolicy is kLABiometryTypeTouchID which is definitely not correct.

Steps to Reproduce

  1. Open a database
  2. See that the database is immediately changed even if user has done nothing

Can be reproduced if a normal keyboard is connected to a Mac Mini or some other Mac that does not have integrated Touch ID.

Expected Behavior

Database should not be changed on open.

KeePassXC - Version 2.8.0-snapshot / 2.7.10-snapshot
Build Type: Snapshot
Revision: ca9b88f

Operating System: macOS
Desktop Env: -
Windowing System: -

@droidmonkey
Copy link
Member

This could be the database being assigned a public uuid

@varjolintu
Copy link
Member Author

If I save the database and reopen it, the issues does not happen again.

@droidmonkey
Copy link
Member

This happens when quick unlock is enabled on macos even though it doesn't actually work (ie, when you don't have touch id or watch to initiate quick unlock)

@varjolintu
Copy link
Member Author

I'm pretty sure this is some kind of macOS bug because the value of context.biometryType is LABiometryType.touchID right after the context initialization. The default value should be LABiometryType.none
https://developer.apple.com/documentation/localauthentication/lacontext/biometrytype

@findus
Copy link
Contributor

findus commented Dec 24, 2024

I remember this behavior when I tested the code on an iMac, TouchID was not enabled at all (even the menu entry did not exist in the preferences menu, because no TouchID hardware was available)

After connecting a magic keyboard for the first time, the menu entry appeared together with this popup window:
Image

After that, the menu entry remained visible, even after I deleted all my saved fingerprints and unpaired the keyboard (#11410 (comment))

So maybe the context.biometryType keeps always defaulting to touchID the moment you pair touchID hardware once , even though you remove the hardware again later 🤔?

I could cross test the behavior with my hackintosh, but I need to set it up again, that will take some time.

@varjolintu
Copy link
Member Author

@findus The strangest thing is that I have never connected a Touch ID supported device to this mac. I'm using old keyboards etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To triage
Development

No branches or pull requests

3 participants