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

Mounting network filesystem with open database results in Merge dialog shown every time #4118

Closed
gmta opened this issue Jan 7, 2020 · 1 comment
Assignees
Milestone

Comments

@gmta
Copy link

gmta commented Jan 7, 2020

Expected Behavior

When I mount a network (smbfs) filesystem with an already open database file present on it, KeepassXC detects that the database was not modified since the last time it was opened and takes no special action.

Current Behavior

KeepassXC shows a dialog asking to merge the database with the database file every time the network filesystem gets (re)mounted.

Possible Solution

Compare date/time and hash of database file to see if a merge is necessary.

Steps to Reproduce

  1. Mount a smbfs filesystem
  2. Open a database in KeepassXC
  3. Unmount and remount the filesystem
  4. Open KeepassXC

Context

I'm mounting three smbfs filesystems on my Mac and every time my network switches (e.g. from LAN to WiFi, VPN, etcetera) a script runs to check if the filesystems are still mounted correctly. If not, they are remounted. This causes KeepassXC to prompt me to merge the database file every time.

Debug Info

KeePassXC - Version 2.5.2
Revision: 62cda9d

Qt 5.14.0
Debugging mode is disabled.

Operating system: macOS 10.15
CPU architecture: x86_64
Kernel: darwin 19.2.0

Enabled extensions:

  • Auto-Type
  • Browser Integration
  • SSH Agent
  • KeeShare (signed and unsigned sharing)
  • YubiKey
  • TouchID

Cryptographic libraries:
libgcrypt 1.8.5

@gmta gmta added the bug label Jan 7, 2020
@droidmonkey
Copy link
Member

This is a result of doing strict hash checking. If the file cannot be opened for hashing, we clear the hash cache. Once the file is opened again we compare the blank hash with the actual hash and it always comes up different. This results in the merge prompt. Simple fix, we shouldn't be clearing the known hash on failure to open the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants