Ability to auto-lock the database
There only a lock button in KeepassX 2.0 alpha 3 but no auto-lock and timer option.
Test on Linux Mint 13 Cinnamon 64 bits.
Currently there is no way to lock the database. The Windows version can lock the database with a button press and can even automatically lock the database after a set time frame or when the screensaver comes on. I do not like having my database unlocked while I am not at my desk, and the auto-lock feature is incredibly useful to keep me from having two databases open from different locations.
#3 Updated by Wade Dugas over 5 years ago
I developed this for the alpha 4 version and tested it on OS X 10.8.5. It includes the ability to enable it and change the timeout value in Preferences/Security. I haven't tested it on Linux.
Perhaps someone here can let me know the procedures used for code review and check-in to GitHub.
#4 Updated by Felix Geyer over 5 years ago
Thanks for working on this feature :)
The preferred method is to fork the repository on github (https://github.com/keepassx/keepassx), then push your commits to the forked repo and open a pull request.
https://help.github.com/articles/creating-a-pull-request has some more details.
#5 Updated by Wade Dugas over 5 years ago
I opened a pull request as requested.
I have a couple of thoughts/comments:
I started developing against code I cloned on Sep 24. Everything was tested and working as expected. I then applied my changes to the fork I created on Oct 17. The app would crash on startup with a bad pointer to config. I corrected the issue by creating my own pointer to config. Instead of using config()->get, I created Config* m_config = config() in MainWindow.h and then used m_config. The error (EXC_BAD_ACCESS(Code 2)) was occurring in my event filter, but only after being called many times. Not calling config() every time seems to have fixed it. Let me know if anybody has an idea why this started occurring and why the fix fixed it.
Also, an additional nice-to-have feature would be to temporarily save any entries/groups being created or edited when the database is locked. If a user creates or edits and entry/group, the database is auto-locked or locked by the user, then the user closes the app -> all changes are lost without warning. This currently happens if you lock the database manually and then close the app. At least, there should be a warning asking if you want to save your work before closing. Better would be the option to temporarily save the work so the next time the app is opened the user is able to continue editing/creating where they left off. Thoughts???
#6 Updated by Wade Dugas over 5 years ago
I tracked down the issue with the bad pointer. The config needs to be initialized before it is called in the event filter. I'm still not sure why the call doesn't work from the event filter, but this fixes the problem.
I checked in again and:
- Reverted back to using config() instead of creating a new pointer m_config.
- added a call to config() in the code block installing the event filter. This insures config is instantiated before the event filter is invoked.