Commit Graph

3643 Commits

Author SHA1 Message Date
Janek Bevendorff
13eb1c0bbd Improve resilience against memory attacks
To reduce residual fragments of secret data in memory after
deallocation, this patch replaces the global delete operator with a
version that zeros out previously allocated memory. It makes use of
the new C++14 sized deallocation, but provides an unsized fallback
with platform-specific size deductions.

This change is only a minor mitigation and cannot protect against
buffer reallocations by the operating system or non-C++ libraries.
Thus, we still cannot guarantee all memory to be wiped after free.

As a further improvement, this patch uses libgcrypt and libsodium
to write long-lived master key component hashes into a secure
memory area and wipe it afterwards.

The patch also fixes compiler flags not being set properly on macOS.
2019-04-21 09:39:28 -04:00
joshirio
c7898fdeee Snap: fix session database locking 2019-04-20 14:48:38 -04:00
Jonathan White
53796a216e Windows: use winqtdeploy instead of DeplyQt4 from CMake ()
* Ensure Qt dlls find plugins in bundled directory
* Reduce complexity of deployment code
* Standardize use of CMAKE_BUILD_TYPE_LOWER for more robust comparisons

Fixes . Fixes part of .
2019-04-20 18:12:00 +02:00
Jonathan White
219a0f40ff Prevent infinite save loop when location is unavailable ()
This bug impacted unsafe saves. When auto save after every change was enabled, an
unsafe save to a location that has become unavailable (eg, dismounted veracrypt drive),
the database modified signal would continually activate a save action that failed.
This caused an infinite loop.

When auto-save on exit was enabled, the database tab and the application itself refused to
close if saving failed for whatever reason.

The fixes in this commit prevent both of these scenarios from occurring.
2019-04-20 18:10:07 +02:00
Jonathan White
bbe7e8a45a Use QLocale for translation search instead of custom method ()
Use built-in facilities of Qt to traverse QLocale::uiLanguages() to find a valid "most preferred"
language, but still respect user's choice in the application settings.
Fixes . Fixes .
2019-04-20 18:00:45 +02:00
Jonathan White
acd6847cd4 Support Ctrl+Enter shortcut on all dialogs with QPushButtonBox ()
* Remove specific action from EditEntryWidget
* Implement key handling at the lowest level
* Fix 
2019-04-20 17:54:25 +02:00
Jonathan White
cb442f8c6e Don't mark entry edit as modified when attribute selection changes ()
When selecting another attribute in the advanced tab, do not mark the entry as modified
(nothing was changed). Also do not mark as modified when the notes checkbox is
checked/unchecked (doesn't change entry). Fixes .
2019-04-20 17:51:15 +02:00
Jonathan White
7d46ce3de1 Correct CLI help messages on Windows
* Prevents keepassxc-cli.exe -> keepassxc-cli show.exe
* Fixes 
2019-04-20 11:03:06 -04:00
Jonathan White
5b28610c6a Remove apply button from application settings 2019-04-17 08:57:51 -04:00
Jonathan White
42d34a1999 Made changes to streamline icon downloading process 2019-04-16 23:02:46 -04:00
Xaver Maierhofer
12e020b7c2 Add option to prefer DuckDuckGo 2019-04-16 23:02:46 -04:00
Allen Wild
7bd079d48d
add Lock Databases option to tray icon menu
This is useful when keepassxc is minimized/hidden to the tray, and all
the plumbing is already in place from the lock icon button in the main
window UI.
2019-04-16 21:09:51 -04:00
Jonathan White
a0c84dbd0d
Bump version numbers to 2.4.2 2019-04-16 21:09:42 -04:00
Jonathan White
ba4d68c76e
Bump version numbers to 2.5.0 2019-04-16 21:08:02 -04:00
Christian Kieschnick
7067a4d004 Fix canceling cancel request in edited group
In case of a modified group, pressing cancel in the confirmation dialog
of cancel led to discarding the changes instead of returning to the edit widget.
2019-04-16 10:07:46 -04:00
Jonathan White
663467e214 Fix macOS Toolbar Button color
* Correct color setting only if dark mode is enabled
2019-04-16 10:07:30 -04:00
Bryan Jacobs
04983ce4cd Support for RFC-compliant TOTP hashes
This implements support for SHA-256 and SHA-512 hash algorithms when
generating TOTP codes. These algorithms are specified by RFC6238. The
implementation is compatible with Google's OTP URL format, as well as
with the KeeOTP plugin for KeePass.

The implementation is not wired into the GUI, as the main project
developer expressed strong negative sentiment about adding more
options there. It is possible to configure codes by putting the
appropriate string into the entry's otp property, or using another
program with a less opinionated UI and a compatible on-disk format.
2019-04-15 14:23:26 -04:00
Toni Spets
61b1f8c966 Add free text filter to Auto-Type dialog ()
* Fixes 
2019-04-15 14:19:58 -04:00
Weslly
7546ba7406
Remove hardcoded background color from search help widget 2019-04-15 14:14:56 -04:00
Weslly
8e19843db7 Remove hardcoded background color from search help widget 2019-04-13 18:21:42 -04:00
Gianluca Recchia
c3ae446fd9 Fix syntax highlighting in CONTRIBUTING.md ()
Code snippets are now marked as cpp so that GitHub highlights them
correctly.
2019-04-13 16:31:43 +02:00
Jonathan White
d5d51d668f
Merge branch 'master' into develop 2019-04-12 18:23:23 -04:00
Jonathan White
7bafe65d17
Release 2.4.1
- Fix database deletion when using unsafe saves to a different file system []
- Fix opening databases with legacy key files that contain '/' []
- Fix opening database files from the command line []
- Fix crash when editing master key []
- Fix multiple issues with apply button behavior []
- Fix issues on application startup (tab order, --pw-stdin, etc.) []
- Fix building without WITH_XC_KEESHARE
- Fix reference entry coloring on macOS dark mode []
- Hide window when performing entry auto-type on macOS []
- Improve UX of update checker; reduce checks to every 7 days []
- KeeShare improvements [, , ]
- Re-enable Ctrl+C to copy password from search box []
- Add KeePassXC-Browser integration for Brave browser []
- SSH Agent: Re-Add keys on database unlock []
- SSH Agent: Only remove keys on app exit if they are removed on lock []
- CLI: Add --no-password option []
- CLI: Improve database extraction to XML []
- CLI: Don't call mandb on build []
- CLI: Add debug info []
- Improve support for Snap theming []
- Add support for building on Haiku OS []
- Ctrl+PgDn now goes to the next tab and Ctrl+PgUp to the previous
- Fix compiling on GCC 5 / Xenial []
- Add .gitrev output to tarball for third-party builds []
- Add WITH_XC_UPDATECHECK compile flag to toggle the update checker []
2019-04-12 18:12:12 -04:00
Jonathan White
5b007ece14
Update translations 2019-04-12 18:11:57 -04:00
Jonathan White
0d4318e466
Version bump to 2.4.1 2019-04-12 18:10:39 -04:00
Jonathan White
b97cc1d398
Reverse direction of CTRL+PGUP/PGDN
* Conform to standard selection direction
2019-04-12 16:37:13 -04:00
Weslly
fbba5b1420 Fix conditional build flags for yubikey and keeshare 2019-04-12 16:29:13 -04:00
Christian Kieschnick
05bee40f0a Fix duplicate icon add in export
SharedObserver did not check for already added icons add during export
leading to duplicate icons in the target db.
2019-04-12 16:14:23 -04:00
Jonathan White
771ecdba12
Fix missing function definition on macOS 2019-04-12 16:08:38 -04:00
ckieschnick
2eb82c8356 Improve file tracking in BulkFileWatcher ()
Introduce modification-based change tracking in BulkFileWatcher to
reduce emitted signals caused by file changes within the same directory.
Resolves .
2019-04-12 19:59:50 +02:00
Jonathan White
e7815787c7 Fix referenced entry color on macOS dark mode ()
Introduce macUtils()->isDarkMode() function to detect Mojave dark
mode and correct reference entry text color. Fixes .
2019-04-12 19:57:49 +02:00
Jonathan White
cc27a367d6 Only remove keys on exit if they would remove on lock ()
* Don't remove keys on app exit that would not be removed due to database locking.
* Restores behavior from 2.3.4
* Fixes 
2019-04-12 19:55:28 +02:00
Janek Bevendorff
bc5173bac7
Fix compilation with GCC 5 () 2019-04-12 19:49:43 +02:00
Jonathan White
c195452c54 Re-Add keys on database unlock
* Keys that were previously added do not show an error message (they are most likely still in the agent)
* Shifted to using the KeeAgentSettings class to guide behavior of addIdentity function
* Fixes 
2019-04-11 16:17:50 -04:00
Jonathan White
1f28dc6013
Merge branch 'release/2.4.1' into develop 2019-04-11 10:21:52 -04:00
Jonathan White
2ffefc95ae Enhance update checker
* Reduce initial update check notification to 500 ms to prevent inappropriately stealing focus from user
* Add build flag WITH_XC_UPDATECHECK which defaults to ON
* Update checks are resolved every 7 days instead of every time the application is started
* Better checks for beta builds; ignore snapshots
* Increase test cases
2019-04-11 08:52:51 -04:00
Jonathan White
53a57ee8c7 Hide window when performing entry auto-type on macOS
* Instead of choosing the last active window, always hide the current window (ie, KeePassXC)
* Fixes 
2019-04-10 20:31:24 -04:00
Jonathan White
8bc94874a1 Enhance release-tool handling of app signing
* Introduce .gitrev file to tarball generation
* Correct labeling of builds based on supplied parameters to CMake
* Convert supplied key file path to absolute when building under MSYS
* Support OVERRIDE_VERSION to build properly version numbered snapshots
* Do not build tests for any build
2019-04-10 16:12:33 -04:00
ckieschnick
29c79c935a More detailed KeeShare sharing messages ()
* ShareObserver watches all shares

ShareObserver watches all shares to and considers settings only on
checking for changes. This fixes an assertion when an export group
signal is received, but export was disabled.

* Extend share message in group view

Extended the message for shared groups to indicate deactivate
import/export and errors when the share was not correctly configured.
2019-04-07 22:19:51 -04:00
Jonathan White
1493943e2e Add integration with Brave browser
Fixes 
2019-04-07 21:00:15 -04:00
Jonathan White
4b1258f585 Correct issues with apply button
* Don't show apply button when creating new entries or groups (Fix )
* Don't mark entry/group as dirty when first creating a new one (prevents unnecessary discard dialog on cancel)
* Properly enable/disable apply button when changes are made to entries and groups
* Don't show discard change warning when locking database unless their are actual changes made

NOTE: Extra pages in the group edit widget are not watched for changes yet. Requires a major refactor.
2019-04-07 19:12:45 -04:00
Jonathan White
71e375aff0 Allow copying passwords directly from searching
* Reverts removal of previously implemented feature
* Fix 
* Make gui search tests more robust
2019-04-07 19:12:45 -04:00
Jonathan White
88c8cdd800 Add note to restart after changing language
* Fix 
2019-04-07 19:12:45 -04:00
Jonathan White
0201fcd400 Improved error messages when opening database
* Reduced wording and confusion
* Streamlined delivery format
* Fix 
2019-04-07 19:12:45 -04:00
Jonathan White
791b796c23 Additional layer of protection for unsafe saves
* Attempt to restore database, if that fails retain the temporary file and tell the user where it is located
2019-04-07 12:12:43 -04:00
Jonathan White
3b0b5d85e9 Correct behaviors when saving database fails
* Mark database dirty if saving fails
* Restore database file from backup if unsafe save fails between deleting database file and copying temporary file into place
* Improve error message display for opening and saving database files
* Do not automatically retry saving after failure. This prevents deletion of the backup database file and improves user awareness of issues.
2019-04-07 12:12:43 -04:00
Jonathan White
ec82931573 Fix broken safe saves across file systems
* Fix 
* Qt has an undocumented rename implementation for QTemporaryFile that does not fallback to the copy implementation. Forcing the use of QFile::rename(...) allows for this fallback and protects against cross-device link errors.
2019-04-07 12:12:43 -04:00
Jonathan White
835e1b8787
Merge pull request from keepassxreboot/fix/database-filename
Correct opening files from command line; cleanup master key editing
2019-04-02 21:46:23 -04:00
Janek Bevendorff
e025444c86 Fix double password edit field 2019-04-02 22:32:48 +02:00
Janek Bevendorff
f49a8a7f70 Fix key component widget initialization and password field echo mode on database open 2019-04-02 00:05:39 +02:00