Commit Graph

3317 Commits

Author SHA1 Message Date
Pat Long
f9f82e9705
Add optional support for Botan3 (#8994) 2023-02-18 16:38:39 -05:00
Sami Vänttinen
4a30417f76
Browser Integration code cleanup (#8489)
Co-authored-by: varjolintu <sami.vanttinen@protonmail.com>
2023-02-18 15:52:31 -05:00
Jonathan White
ba15981700 Translate Cipher and KDF strings
* Fix #8952 - move translations for Cipher and KDF strings into evaluated code instead of globally defined code. The strings were being baked prior to the language being set resulting in only english being displayed.
2023-02-14 22:34:14 -08:00
Bernhard Kirchen
f9d99fe8ca revise strings labeling history limit settings 2023-02-14 22:33:54 -08:00
Charlie Wang
b84d38e7fb Properly handle Windows Hello errors
The KeyCredentialManager::RequestCreateAsync call can fail because we can end up in a situation where Windows Hello is initially available but then becomes unavailable, such as during a remote desktop session. This commit prevents a crash by moving the call into the try-catch.

Fixes #7890

Also resets quick unlock if there is an unrecoverable error. This will not occur if the user merely canceled the Windows Hello dialog.
2023-02-14 22:33:42 -08:00
Akinori MUSHA
cc35bf2096 Select new entry after cloning
Also fixes re-selecting entries during a search refresh
2023-02-13 23:22:13 -08:00
Dmytro Maslenko
b4be71d967 Fix arrows size when expand/collapse a group
Change ratio from 0.7 to 0.9 to give a more coherent look and feel to the tree.
2023-02-13 22:12:40 -08:00
jNullj
20e8e524a5
Fix/database settings spin box bug (#9101)
Co-authored-by: jNullj <jNullj@users.noreply.github.com>
2023-02-12 15:39:10 -05:00
Dmytro
5bd871528f
Fix status bar update when switching to other DB (#9073)
* Gui tests: add validation of StatusBarLabel in some tests
2023-02-07 22:11:52 -05:00
Dmytro Maslenko
bba0c09b42 Fix text selection for clear_field step on Mac 2023-02-07 06:57:45 -05:00
Dmytro Maslenko
f703736685 Scale and center QR code on window resizing
* Also add GUI test for QR code resizing
2023-02-02 00:03:30 -05:00
Toni Spets
3243243be8 SSH Agent: Add support for generating SSH keys
Supported key types are RSA, ECDSA and Ed25519.

Includes tests to compare writing out keys produce the exact same private key if read from OpenSSH format and tests against ssh-agent to ensure all no generated key is rejected.
2023-02-01 23:32:56 -05:00
Dmytro Maslenko
714c0a5be2 Set shortcuts for settings and database settings
* Open app settings with Ctrl+,
* Open database settings with Ctrl+Shift+,
* Open database reports with Ctrl+Shift+R
2023-01-29 20:15:50 -05:00
Lars Fröder
1e770e3a71
Don't rely on AppleInterfaceStyle for theme switching (#8615)
* Fix #7615 - Don't rely on AppleInterfaceStyle preference key for dark mode detection, as it's not always correct
2023-01-29 20:15:12 -05:00
Jonathan White
d90b32a7c9 Support {MODE=VIRTUAL} on macOS
* Fix #8433
2023-01-29 20:12:48 -05:00
olivier
2c256023a9
Properly enable auto-type ui elements on entry edit page (#8752)
Fixes #8743
2023-01-29 20:09:31 -05:00
Rosen Penev
52af8a5e2a
clang-tidy: use = default (#7999) 2023-01-29 15:47:13 -05:00
Rosen Penev
e1fbed0e25 get rid of make_pair
pair is the same with C++17

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-29 15:43:44 -05:00
Dmytro Maslenko
5226a59ede Improve exported html layout
[What]
  1) The title was moved from dedicated column to a table caption.
  2) The font size for notes was changed from medium to small.
  3) The notes order was moved to the end.
  4) The table margin and width were adjusted to fit into screen and
     print pages.

[Why]
  To have more readable output and utilize more page space.
2023-01-29 15:19:25 -05:00
Dmytro Maslenko
ea183a6889 Move 'Copy URL' into main entry context menu 2023-01-29 15:19:04 -05:00
tenzap
ef8c7b0a4c
Fix build failure with Qt5.6 (#8829)
With Qt 5.6, build fails with error below.

This is because in Qt 5.6, the 3rd argument is not optional. Starting from Qt
5.7 the default value for the 3rd argument is nullptr, so setting it to
nullptr.

https://doc.qt.io/archives/qt-5.6/qaction.html#QAction-2
https://doc.qt.io/archives/qt-5.7/qaction.html#QAction-2

Error:
src/gui/tag/TagView.cpp:79:38: error: no matching constructor for initialization of 'QAction'
        auto action = menu.exec({new QAction(icons()->icon("trash"), tr("Remove Search"))}, mapToGlobal(pos));
                                     ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2023-01-29 11:12:12 -05:00
Pat Long
e221f89e68
Fix support for AES-256/GCM openssh keys (#8968)
* Fix detecting AES-256/GCM cipher, fixes #8964 

When you generate a ssh key using the aes-256/gcm cipher, the cipher name in the keyfile includes an @openssh.com at the end.

* Use separate iv length for getting iv data, the assumption that the block size and iv size are equal does not hold for every cipher mode (e.g., GCM)

* Disable AES-256/GCM for now in ssh keys 

Currently, the granularity for the botan gcm implementation is too large. To fix a problem with another algorithm in the library, they are multiplying
the blocksize, so by default the granularity is 64. This causes issues since the encrypted data in the key is only guaranteed to have a length that is a multiple of the block size (16).
2023-01-29 10:57:09 -05:00
chandi Langecker
03ad6c52c0
Fix unexpected behavior of --lock when keepassxc is not running (#8889)
currently, when keepassxc is not running, the command `keepassxc --lock` opens a new keepass window and blocks until the window is closed.

Especially in locking scripts this is rather unexpected and  Ican't think of a case where someone explicitly starts keepass with --lock and wants this behaviour.

Rather --lock should always ensure, that there are no unlocked instances and exiting afterwards
2023-01-29 10:50:37 -05:00
Sami Vänttinen
ce51534c3a
Remove KeePassHTTP attribute conversion (#8007)
Co-authored-by: varjolintu <sami.vanttinen@protonmail.com>
2023-01-29 10:32:24 -05:00
Jonathan White
55571b5d1b
Fix canceling quick unlock when it is unavailable (#9034) 2023-01-29 10:08:16 -05:00
Rosen Penev
318157d242
clang-tidy: use braced init list (#7998) 2023-01-29 10:05:44 -05:00
luzpaz
880cc230ac
Fix various typos (#8748) 2023-01-29 09:38:44 -05:00
Dmytro
8846880015
Fix db history when adding new db (#9022)
Fixes https://github.com/keepassxreboot/keepassxc/issues/8375
2023-01-29 09:24:10 -05:00
Klemens Nanni
93831f64a3
Set password hint on BSD, fill selection on macOS again (#8949) 2023-01-29 09:17:04 -05:00
Jonathan White
3e3e87d3c5
Hide rename button from attachments preview panel (#8842) 2022-12-18 22:57:30 -05:00
Daniel Ziegenberg
c410c380f6
Fix Ctrl+Tab shortcut to cycle databases in unlock dialog (#8839) 2022-12-18 22:56:55 -05:00
Sami Vänttinen
2d6f2f7895
Fix Native Messaging script path with BSDs (#8835)
Fixes https://github.com/keepassxreboot/keepassxc/issues/8830
2022-12-18 22:56:31 -05:00
Sami Vänttinen
ad773c567d
Fix crash in Group Edit after enabling Browser Integration (#8778)
Fixes https://github.com/keepassxreboot/keepassxc/issues/8775
2022-12-18 22:56:00 -05:00
jNullj
afc7dcd83c
Add Unicode support for database filenames on Windows (#8782)
Fixes #8751
2022-11-11 11:21:30 +01:00
Janek Bevendorff
3cbe4df8c7
Set password input field font correctly. (#8732)
Also update member variable names to describe their contents better.

Fixes #8709
2022-11-02 19:13:48 +01:00
Jonathan White
6fa34bdbfe
Fix SSH Agent Build on MSYS Windows (#8708) 2022-10-29 23:11:08 +02:00
Jonathan White
a5dee81e45 Browser: second fix for linked socket path
* Fix #8702
2022-10-29 14:33:36 -04:00
Jonathan White
ceb2cd2b67 Prevent expired entries search if no results returned
* Fixes #8626
* Also remove old feature to set the title of a new entry to the current search text. This only made sense before advanced searching was made available.
2022-10-29 09:31:36 -04:00
Matthew Donoughe
ab95690043
CLI: Add Unicode support on Windows (#8618) 2022-10-29 08:07:31 -04:00
Sami Vänttinen
37baa6fd25 Revert async Access Confirm Dialog 2022-10-29 07:40:33 -04:00
varjolintu
69f05d4c26 Fix deleting existing socket file before making a new symbolic link 2022-10-28 07:30:15 -04:00
YAMASAKI Masahide
91fafccb0a
SSH Agent: Fix CreateFileMappingA Parameter (#8619)
The last argument of CreateFileMappingA is of type string.
2022-10-28 04:51:27 -04:00
Hoai-Thu Vuong
ef51065c98
Add entry 2 months to preset menu (#8687) 2022-10-28 09:28:00 +02:00
Jonathan White
03f11ce516 Fix clicking links in entry preview panel
* Fixes #8636
2022-10-27 17:18:31 -04:00
Jonathan White
2583cc4aa4 Fix crash on macOS when unlocking database
* Fix #8639
2022-10-27 16:41:29 -04:00
Jonathan White
422fd91255 Fix display of passwords in preview panel
* Fix #8627 - don't HTML escape plain text...
* Fix #8624 - ensure use of monospace font when displaying passwords in preview panel
2022-10-24 23:48:34 -04:00
Janek Bevendorff
93fedd0fff Fix macOS window activation issues
Reverts part of 34b7d08a5, which introduced a regression.
2022-10-23 14:47:22 +02:00
Patrick Klein
1d00c22244
Add a URL that preserves the URL path when trying to resolve favicons. (#8565) 2022-10-19 20:50:17 -04:00
Jonathan White
e180980b90 Fix potential deadlock in UI when saving
This was noted as a problem in several issues and it finally occurred to me and I traced it to the fact that a timing issue sometimes allowed the file watcher to trigger a "file changed" alert right when saving starts. I fixed this by moving where the mutex lock is made for saving and preventing database reload during a save operation.
2022-10-19 07:02:38 -04:00
Jonathan White
e6b2e4e95e Hide usernames in preview panel when hidden in entry view
* Fix #6306
2022-10-19 07:02:19 -04:00
Jonathan White
1af985fde9
Allow picking tags from completion menu with keyboard
* Also fixes the hiding and display of the completion menu to be more natural and less annoying.
* Fixes #7939
2022-10-18 18:24:35 -04:00
Jonathan White
f096f7d7fa Fix use of WITH_XC_X11 build flag 2022-10-17 16:23:50 -04:00
Jonathan White
affff20b49 Fix focus traps
* Fix focus issues with new PasswordWidget
* Fix focus wrapping when DatabaseTabWidget is not showing the tab bar
* Fix focus wrapping in EditWidget views to move between category list and contents. This is not a perfect fix, but Qt has a mind of its own with these complex widgets. This will be fixed in future Ui improvements that move away from the category widget.
2022-10-15 17:33:36 -04:00
Jonathan White
6f64c84c7d Fix crash when application is unfocused during saves
* Fix #8504
2022-10-15 17:33:36 -04:00
Owen Wang
893b398d73 Fix newlines when copying from DatabaseWidget 2022-10-05 07:32:45 -04:00
louib
db98f114f9
[CLI] Add a db-edit command (#8400) 2022-10-05 07:30:15 -04:00
Wolfram Rösler
b1e7c34b82 Add option to display passwords in color in preview panel
Closes #4099

* Fixed bug in Application that did not set the dark theme flag when the theme was changed from dark to light.
2022-10-03 22:03:36 -04:00
Patrick Klein
54f9b25b52
Add XML Export option to GUI. (#8524)
* Add XML Export option to GUI.

* Update database export screenshot.
2022-10-02 23:04:21 -04:00
Patrick Sean Klein
9366c5c233 Increase entropy required for a "good" rating to 75. 2022-10-02 14:37:51 -04:00
Bernhard Kirchen
f9f9a34ba3 entry: remove unread variable in truncateHistory() 2022-10-02 10:30:20 -04:00
felipdsa21
e7fe3ff968 Fix dark mode detection on Linux
Fixes #7817
2022-10-02 10:26:33 -04:00
Jonathan White
eaa363d8c0
Fix crash when deleting items in recycle bin while searching (#8117)
* Fix #8099
* Clean up code that connects groups to the entry view. Instead of connecting ALL groups from ALL databases, we only need to connect the groups that entries actually belong to. This solves the bug and also reduces overhead.
2022-09-22 08:40:23 -04:00
Jim Heden
33d8b6db62 Add shortcut to copy password with TOTP appended 2022-09-11 11:37:27 -04:00
mckeema
dd15db721a Set correct case for database file path on Windows
* Fix #7139 - when opening database files from the command line, ensure the correct case is fed to the program to prevent case changes during saves.
* Cleanup old code (checking for .json extension) from when KeePassXC app could act as a proxy.
2022-09-10 13:35:54 -04:00
varjolintu
ef6d8f1138 Browser: Asynchronous Access Confirm dialog 2022-09-10 13:18:30 -04:00
andreas-ementio
612c1098ea Fix CLI output when using clip with the -t flag
if you use the CLI with -t/--totp flag, the program prints out: "Entry's "password" attribute copied to the clipboard!"
expected output is "Entry's "totp" attribute copied to the clipboard!" the same when you run with -a totp
2022-09-08 06:48:18 -04:00
varjolintu
ed7b634dbf Do not allow expired credentials automatically 2022-09-08 06:48:05 -04:00
Jonathan White
4c1e5ec74c Support numeric aware sorting on Windows and macOS
* Fix #8356 - Qt does not enable numeric aware sorting when using locale sort. Extracted both Windows and macOS locale aware sorting code and added the appropriate numeric aware flag.

Note: There is no std library way to do this so Linux is out of luck for now.
2022-09-08 06:47:14 -04:00
Jonathan White
b0a68ea0de Improve various application icons 2022-09-08 06:46:48 -04:00
Jonathan White
f32dc96757 Show entry count in status bar
Closes #3963
2022-09-08 06:46:48 -04:00
Jonathan White
79ac8b3c95 Fix tabbing around database widget
Fixes #8352
2022-09-08 06:46:48 -04:00
Jonathan White
e5bd5f39fb Use search for showing expired entries on unlock
* Fix #8036 - use search interface to display expiring entries on first unlock.
2022-09-08 06:46:48 -04:00
Jonathan White
dfee59742f Enhance Tags / Saved Searches
* Rename "Database Tags" to "Searches and Tags"
* Separate searching for all entries and resetting the search
* Support selecting multiple tags to search against
* Fix using escaped quotes in search terms
* Make tag searching more precise
* Support `is:expired-#` to search for entries expiring within # days. Exclude recycled entries from expired search.
* Don't list tags from entries that are recycled
* Force hide tag auto-completion menu when tag editing widget is hidden. On rare occasions the focus out signal is not called when the tag view is hidden (entry edit is closed), this resolves that problem.
* Remove spaces from before and after tags to prevent seemingly duplicate tags from being created.
* Also fix some awkward signal/slot dances that were setup over time with the entry view and preview widget.

Allow changing tags for multiple entries through context menu

* Closes #8277 - show context menu with currently available tags in database and checks those that are set on one or more selected entries. When a tag is selected it is either set or unset on all entries depending on its checked state.

* Add ability to save searches and recall them from the "Searches and Tags" view
* Add ability to remove a tag from all entries from the "Searches and Tags" view
* Cleanup tag handling and widgets
2022-09-08 06:46:48 -04:00
Jonathan White
61f922179b Check for write permission before entering portable mode
* Fix #7585
2022-09-07 07:06:23 -04:00
Jonathan White
9e81c31e5a Fix OPVault import when there are multiple OTP fields
* Fix #8371 - store multiple OTP fields as `otp_#` instead of silently discarding them.
2022-09-07 06:48:21 -04:00
Yaroslav Isakov
bdeef63fe4 Allow KeePassXC to be built without X11 2022-09-05 13:52:52 -04:00
Jonathan White
ed693e146d Fix Windows Hello bugs
* Fix #7977 - wrap key signing request in try/catch block to prevent crashes on some machines.
* Fix #8120 - try 3 times to bring Windows Hello prompt to front. This may be necessary on older machines that are slow to bring up the prompt window.

Also remove defunct code on macOS to prevent window focus issues.
2022-09-05 12:24:58 -04:00
Klemens Nanni
14f12b0a25 autostart: Linux: Exec= filename not absolute path
Systems like NixOS install software under unique paths, so persisting
the absolute file path in the generated .desktop file when enabling
autostart will eventually point at an outdated or nonexistent program.

Another possible issue with using Qt's `applicationFilePath()` is that
the final program's basename (`argv[0]`) might not be the same as what
the user initially executed to start KeePassXC.

Use the file name and thus rely on `PATH` lookup just like the static
.desktop file does to lift those issues and defer execution logic
(`PATH` lookup, wrapper scripts, etc.) to the operating system.
2022-09-05 12:23:50 -04:00
Christoph Honal
e05f6a4c5b Hardware keys: Add VivoKey and DT token ATRs
This adds the ATRs of the VivoKey Apex and the
Dangerous Things FlexSecure tokens, in order to
display a human-readable name instead of "Unknown Key".
2022-09-05 11:24:58 -04:00
Dennis
bd809ba90b
TouchID support refactoring (#8311)
Fixes #7695 - Properly set compile flags based on availability of watch unlock in the API.
2022-09-05 10:38:02 -04:00
louib
15b9e82f93
[CLI] Add Option to show all attributes (Show command) (#8256)
* Adding --all option to Show
2022-08-20 22:38:58 -04:00
louib
aa839e2619 Adding top-level fields to CLI commands
The top-level fields are currently not accessible from the CLI, which
makes it impossible to select entries or groups based on the UUID.
There are other top-level fields I believe, like the expiry date,
but I only added the two most critical fields for the moment.
2022-08-20 18:31:30 -04:00
Jonathan White
a6d3f973fa Better handling of "Lock on Minimize" setting
* Fix #1090 - delay locking databases after minimize to allow for clipboard use, Auto-Type use, and browser integration use.

* Fix #6757 - prevent setting both minimize on unlock and lock on minimize settings at the same time.
2022-08-01 18:19:45 -04:00
Jonathan White
dab6d9408e Add setting for number of recent files
* Expose setting to limit the number of recent files. Default is still 5, can be set from 1 to 25.
* Also fix tab order on settings page
2022-07-11 06:55:03 -04:00
Daniel Ziegenberg
6b05b84895 Add Ctrl+Tab shortcut to cycle databases in unlock dialog
The main window has both `Ctrl+PageUp` / `Ctrl+PageDown` and
`Ctrl+Tab / Ctrl+Shift+Tab` shortcuts to cycle the database tabs. When
in PR #5427 the abbility to select any open database in the unlock
dialog was introduced, only the `Ctrl+PageUp` / `Ctrl+PageDown`
shortcuts were added. This commit adds the `Ctrl+Tab / Ctrl+Shift+Tab`
shortcuts to the unlock diaglog to fix this inconsistent UI behaviour.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-07-01 22:29:33 -04:00
Bernhard Kirchen
861fe2e5a9 cmake: make libxi and libxtst a requirement with autotype enabled 2022-06-19 10:34:52 -04:00
Bernhard Kirchen
63a5e474a6 cmake: emit warning if X11_Xi or X11_XTest not found
at least on Debian, a bullseye installation, the X11 development files
may be installed without the libxi-dev or the libxtest-dev packages.
this leads to the autotype shared library libkeepassxc-autotype-xcb.so
not being built without any complaint from cmake.

this commit makes cmake emit warning messages that shall hint anyone
building themselves that autotype will not work without these libs.
2022-06-19 10:34:52 -04:00
Jonathan White
b86c3e64ec Fix crash when trying to close database during unlock
* Fix #7239 - prevent closing the database widget if the open dialog is still unlocking the database. This problem became slightly worse with quick unlock.

With this fix, if the user tries to close the database during unlock we will just ignore that request.
2022-06-14 05:58:38 -04:00
varjolintu
6cb6f1f007 Browser: Add a new group setting for omitting WWW subdomain when matching URLs 2022-06-12 16:45:54 -04:00
varjolintu
c1dbe27f25 Emit database changed event on single db lock 2022-06-11 09:29:26 -04:00
Felix Stupp
de3d40b644 Add methods isHardwareKeySupported and refreshHardwareKeys to DBus 2022-06-11 09:28:26 -04:00
Jonathan White
20a2a96222 Auto-Type: PICKCHARS can specify attribute and ignore BEEP
* Fix #7726 - Ignore BEEP Auto-Type token when it includes spaces and numbers as well
* Close #8103 - Allow specifying specific attribute to use with PICKCHARS. If none specified, it defaults to Password.
2022-06-09 10:05:03 -04:00
Jonathan White
b1f4e12d34 Improve entry preview panel
* Fix #7811 - Notes height no longer truncated
* Fix #7949 - Improve copying attribute value to clipboard in entry preview
* Fix #7898 - Prevent copying url when copy password selected after clicking url in preview pane
* Fix #7982 - Double clicking hidden attributes in preview pane copies the value instead of ●●●●●●
2022-06-06 07:20:15 -04:00
Michael Ziminsky (Z)
bc0a5a9440 Fix autotype menu entries on Windows 2022-06-05 22:02:23 -04:00
Patrick Sean Klein
e16c007d43 Correct regex escape logic
* Fixes #7776

Implement QRegularExpression::escape within Tools::convertToRegex to allow usage on older Qt versions.

Also wrap EXACT_MODIFIER patterns in a non-capture group to prevent misinterpreted regex.
2022-06-05 21:58:52 -04:00
varjolintu
924eb6dbc4 Pass database locked/unlocked status even with Search All Databases option enabled 2022-06-05 21:30:10 -04:00
Jonathan White
b5e0572155 Fix Auto-Type gui guard for tests
Prevent showing gui error dialogs when no gui is present. This can occur during auto-type tests.
2022-06-05 07:04:34 -04:00
Jonathan White
0f3a2531e7 Fix use of modifiers under macOS
* Fix #6463
2022-06-05 07:04:23 -04:00
Jonathan White
dab7047113 Fix file dialog not appearing on snap build
Fix #7607 - Don't disable core dumps when building for snap distribution. Doing so will not allow the xdg-desktop-portal from opening the file dialog. This is because the portal attempts to call entries from /proc/[pid]/xxxx which are restricted to root when core dumps are disabled.
2022-06-05 07:04:11 -04:00
Aetf
0f7b674cbb FdoSecrets: add smarter handling of database unlock requests
This commit implements the following logic:
* If there're already unlocked collections, just use those,
* otherwise, show the unlock dialog until there's an unlocked and exposed collection.

* Fixes #7574
2022-06-04 16:27:18 -04:00
Aetf
e2bf537c4a FdoSecrets: ask to unlock the database when creating items
Also only emit databaseUnlockFinished after the database is unlocked

Fix #7989
2022-06-04 15:49:34 -04:00
SnipFoo
806b8b0901 Add config variable for specifying a default file name for the database 2022-06-04 13:13:49 -04:00
J.M. Dana
a740fe128c Add password strength indicator to PasswordEditWidget
Fixes #7437 (entry edit view only)
Fixes #5220
2022-05-31 07:34:50 -04:00
Patrick Sean Klein
65a1d1b0f7 Limit zxcvbn entropy estimation length
Limit the use of zxcvbn based password entropy estimation to 256 bytes. After this threshold, the average per-byte entropy from the zxcvbn calculation is added for each additional byte. In practice, this produces a slightly higher entropy calculation for purely randomized passwords than zxcvbn would normally calculate. However, the time to calculate is capped leading to a much better user experience and removing unnecessary calculations.

Fixes #7712
2022-05-30 10:46:39 -04:00
Hugo
1009650b5c
Move socket into separate directory (#8030)
This is mostly to ease setup and configuration with sandboxed browsers.

The socket currently existing in `$XDG_RUNTIME_DIR`. When sandboxing a browser, it would be unsafe to mount this directory inside the sandbox.
Mounting the socket into the sandbox's filesystem is also not possible in cases where KeePassXC is [re]started after the browser has started.

This commit moves the socket into its own isolated subdirectory, which can be safely mounted into sandboxes. Sandbox engines can create the directory themselves (in case the browser starts before KeePassXC). Both Flatpak and Firejail support this configuration.

A symlink is also created, linking the previous location to the new location. This is meant for backwards compatibility and should eventually be dropped.

The directory can't be named `org.keepassxc.KeePassXC.BrowserServer`,
since that would collide with the symlink. Instead, the directory has been created to match the format used for Flatpak builds, which make it a bit less of a snowflake build, while following accepted conventions.

Given that the preferred path now matches what Flatpak uses, the block handling Flatpak and non-Flatpak is now the same.

If `$XDG_RUNTIME_DIR` is undefined, the temporary directory is used, though reading the socket from this location is discouraged.

Closes: https://github.com/keepassxreboot/keepassxc/issues/8018
References: https://github.com/keepassxreboot/keepassxc/discussions/6741
2022-05-28 18:19:48 -04:00
Carlo Teubner
b14bec3bb0 Remove unused header files 2022-05-28 17:26:41 -04:00
Aetf
a4c5997050 FdoSecrets: skip entries in recycle bin when searching (fix #7933) 2022-05-28 15:36:17 -04:00
Nicolas Roeser
aa97bd5213 Align generator logic and UI for math symbols
In the password generator widget, the checkable push button for the math
symbols is missing the GREATER-THAN SIGN (U+003E), even though it is
among the possible characters during password generation when the button
is checked. Add the missing character to the text displayed to users.

While at it, also fix a wrong comment containing the possible
characters.
2022-05-28 15:24:57 -04:00
Rosen Penev
a4d4adb1f6 clang-tidy: use nullptr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-03 15:32:54 -04:00
Rosen Penev
7e1d980d08 clang-tidy: use auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-01 16:02:02 -04:00
Rosen Penev
f3f1520f81 clang-tidy: C++ headers
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-01 16:01:46 -04:00
Rosen Penev
7e44b67906 clang-tidy: use override
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-01 16:01:31 -04:00
Rosen Penev
44333fef0a clang-tidy: use range loop
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-05-01 16:01:11 -04:00
Carlo Teubner
9bf61bfc5c Fix Botan deprecation warning
Use the non-deprecated PK_Signer constructor overload, by explicitly
passing in our random-number generator.
2022-04-18 09:45:29 -04:00
Piraty
7edeceec03
Link ykcore against pthread (#7807) 2022-04-15 10:27:04 +02:00
hka
692c95b11e
Normalize path (slashes to be precise) when opening a database or saving the last used database paths (#7864)
Fixes #7821
2022-04-12 21:05:06 +02:00
Aetf
6b0eeb9722 FdoSecrets: do not share entry <-> item property by multiple unlock prompts
Fixes #7753
2022-04-05 18:08:46 -04:00
louib
7cd824ae1c
Upstream Flathub patches (#7728) 2022-04-04 19:04:18 -04:00
Jonathan White
31db3c325d Fix compiling with minizip-ng
* minizip-ng has slightly different defines and function names than the original minizip. These changes adapt the existing code to use the minizip-ng versions if necessary.
2022-04-03 13:28:39 -04:00
Jonathan White
656e6161a0 Add tags to history comparison 2022-04-03 13:28:39 -04:00
Jonathan White
44be95cc1b Fix crash when building history changes
* Replace rarely hit asserts with defined nullptr checks when replacing references without a group
* Fix #7603
* Replace TOTP history comparison with checking the actual TOTP output instead of a compiled string
2022-04-03 13:28:39 -04:00
Jonathan White
48a3fd8e3c Fix detection of hardware keys in keepassxc-cli
* Split calls to finding hardware keys into sync and async methods. This has the side effect of simplifying the code.
* Check for keys before performing challenge/response if no keys have been found previously.
* Correct timeout of user interaction message to interact with the hardware key.
* Correct error in TestCli::testYubiKeyOption
2022-04-03 13:26:12 -04:00
Jonathan White
7d7c635423 Disable debug messages in release builds
Also correct / remove various debug messages
2022-04-03 13:26:12 -04:00
Jonathan White
097be1a5cd Fix Auto-Typing single character placeholders
* Fix #7743 - Include # in placeholder list
* This change fixes typing single character placeholders (escaped placeholders) on Windows. Previously we were sending these as raw key presses which didn't properly press Shift or other modifiers. Now they are sent as unicode characters unless in virtual mode (the expected behavior).
2022-04-02 12:51:33 -04:00
Jonathan White
c5d25ac371 Fix Auto-Type modifiers on Windows
Also add documentation on modifiers.

* Fix #7626
2022-04-02 12:51:33 -04:00
Jonathan White
dd5217734c Improve Entry Preview layout
* Fix #7672 - notes preview spans the entire length of the preview pane again
* Fix #4242 - Allow selecting entry title text in preview
* Improve multi-line tag preview
* Fixup alignment and spacing of fields
2022-04-02 12:50:54 -04:00
Jonathan White
41061cfde8 Improve speed of AES KDF transform
* Remove parallel left/right block calculations in favor of calculating both blocks simultaneously. This brings the calculation within parity of 2.6.6.
* Fix #7682
2022-04-02 12:50:43 -04:00
Jonathan White
d8da81d87c Revert DatabaseOpenDialog to be always on top on Linux
Fixes regression due to issues with dialogs appearing above other windows on some Linux Desktop Envs.
2022-04-02 12:50:31 -04:00
Toni Spets
2b8d670f17 SSH Agent: Fix Windows agent selection, radio buttons 2022-04-02 08:47:00 -04:00
Bernhard Kirchen
aca197a96f
Add 12 hours expiration preset (#7738)
* Add hours precision to TimeDelta

* Add 12 hours expiration preset

Fixes #7369
2022-03-31 07:02:28 -04:00
Rosa Hase
044fc8d50c Use setChangeCurrentOnDrag property to handle drag and drop between tabs
.FIXES #7155
2022-03-29 23:19:32 -04:00
Janek Bevendorff
5c45cf2d76 Clear quick unlock secrets when database tab is closed 2022-03-29 23:17:38 -04:00
Janek Bevendorff
7eb7172635 Fix regression: Hide password before unlocking database
Fixes #7724
2022-03-29 23:17:38 -04:00
Jonathan White
02602da257 Several improvements to tags editing
* Fix #7602 - Allow spaces in tag names
* Fix #7528 - Allow pasting text into the tags field. Text is split by comma creating tags for each section of text. If there are no commas then the pasted text becomes a tag.
* Fix tags editing not causing the entry to be marked as modified.
2022-03-29 18:41:31 -04:00
Jonathan White
ad61d71c6e CLI: Add missing parameters to add/edit commands
This adds the `-c` parameter to the password generator when adding/editing entries via the CLI.
2022-03-28 22:08:01 -04:00
Toni Spets
fc5a07b46d Auto-Type: Map ASCII dead keys on Linux
Special handling of ASCII keys that are common in passwords that
may be dead on the current keyboard layout and prevents going to
keysym emulation fallback.
2022-03-28 06:24:58 -04:00
tenzap
01b15fbeba Fix compilation on macOS < 12.0.1
Used methods for touchID on macOS require macOS >= 12.0.1
2022-03-27 15:54:22 -04:00
tenzap
c33995e075 fix compilation of TagsEdit.cpp
qOverload appeared with qt5.7

Reported error:
keepassxc-2.7.0-src/src/gui/tag/TagsEdit.cpp:414:34: error: use of undeclared identifier 'qOverload'
        connect(completer.get(), qOverload<QString const&>(&QCompleter::activated), [this](QString const& text) {
                                 ^
2022-03-27 15:52:31 -04:00
Jonathan White
4178e72fe0 Reduce delay when searching entries in Auto-Type select dialog
* Fix #7596
2022-03-23 16:15:45 -04:00
Jonathan White
eac60b3228 Correct timing issue with entry level Auto-Type on some platforms
* Fixes #7584
2022-03-22 16:10:05 -04:00
Aetf
7d3c3b09fb FdoSecrest: allow remember decision for future entries
Also added a reset decision button in session management tab

Fixes #7464

* Fix distorted button in settings page: the default margin in QToolBar is too large for our use case in a table row.
2022-03-21 08:42:17 -04:00
Jonathan White
9e21df2515
Remove unused variable from Windows Auto-Type 2022-03-21 07:41:56 -04:00
alcroito
ab153a24ec Run macdeployqt only once at install time
Instead of running macdeployqt once for each extra helper binary and
plugin (plus the main run for the application itself), collect all the
binaries that should be processed and run macdeloyqt only once after
all the binaries have been installed.

This also moves the main app macdeployqt call from a POST_BUILD step
to an install(CODE) step, making increment rebuilds of the app faster.

To ensure that macdeployqt is called after all the binaries are
installed, a new post_install subdirectory is needed to
circumvent CMake's limitation regarding the default order of
installation.
CMake first runs the current directory install() calls and then it's
child subdirectory ones. Because we want macdeployqt to be the last
install() call, it needs to be done inside a subdirectory that is
added last.

Note due to a bug in macdeployqt, the deployed app inside the .dmg
file will fail to run on arm macs, due to broken code signature.
See https://bugreports.qt.io/browse/QTBUG-101696 for details.

For the final release, the release-tool should take care of proper
resigning.
2022-03-21 00:15:57 +01:00
Janek Bevendorff
60f7744ec6 Fix translations 2022-03-20 23:31:52 +01:00
Jonathan White
1ca358f3fd Improve KDBX error messages 2022-03-20 23:31:52 +01:00
Jonathan White
cf5429a39b Allow colon in tags and sort alphabetically
* Fix #7489 - allow colon and period in tag names
* Fix #7490 - sort tags alphabetically
2022-03-20 13:33:46 -04:00
Jonathan White
4cc5850c86 Fix broken documentation menu items 2022-03-20 13:33:32 -04:00
Jonathan White
7da9899c48 Correct snapcraft build and update appdata xml 2022-03-20 13:33:32 -04:00
Jonathan White
9569438295 Always enable Auto-Type help button 2022-03-20 17:49:03 +01:00
Jonathan White
8a7eb36950 Several fixes for Auto-Type
* On Windows, offer explicit methods to use the virtual keyboard style of typing. This partially reverts 1150b69836 by going back to the standard unicode method by default. However, uses can either add {MODE=VIRTUAL} to their sequence or choose "Use Virtual Keyboard" / CTRL+4 from the selection dialog.

* Took this opportunity to clean up the signature of  AutoType::performAutoType and AutoType::performAutoTypeWithSequence by removing the "hideWindow" attribute.

* Show keyboard shortcuts on the selection dialog context menu

* Fix selection dialog help icon color when in dark theme
2022-03-19 08:23:53 -04:00