Commit Graph

1979 Commits

Author SHA1 Message Date
xboxones1
43e3fbaaf0 Fix сentering icon and text on buttons 2024-06-22 07:41:39 -04:00
Rafael Sadowski
34808a2caa Verify USB listener callback handle
Do not use `handle` if `libusb_hotplug_register_callback` fails
2024-06-22 07:28:04 -04:00
Sami Vänttinen
fbdd97b1be
Refactor Database Settings (#9485)
Includes following changes:

* Encryption Settings now has a similar key with the new database wizard for switching between Advanced and Simple Settings
* The extra UI layer DatabaseSettingsDialog.ui has been removed. DatabaseSettingsDialog class now inherits EditWidget instead of DialogyWidget (just like Application Settings).
* Extra classes for separate page settings (DatabaseSettingsPageFdoSecrets, DatabaseSettingsPageKeeShare) have been removed. Instead the widgets are used directly in DatabaseSettingsDialog. Same could be done later to Application 

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2024-06-22 07:25:32 -04:00
Carlo Teubner
88b76244cf
Fix all Qt 5.15 deprecation warnings (#7783)
* Deprecated qSort() -> std::sort()
* Replace QDateTime::toString(Qt::DefaultLocaleShortDate) with Clock::toString()
* Replace QDateTime::toString(Qt::SystemLocaleShortDate) with QLocale::system().toString(..., QLocale::ShortFormat)
* Use QDateTime::startOfDay() instead of QDate(QDateTime) 
  Note: QDateTime::startOfDay() is only available in Qt 5.14, we need to guard it
* Replace QString::SkipEmptyParts with Qt::SkipEmptyParts
  Note: Its designated replacement, Qt::SplitBehavior, was only added in Qt 5.14.
* Don't call deprecated QFlags(nullptr) constructor
* QSet::{toList->values}
* Replace QList::toSet, QSet::fromList with Tools::asSet()
* QHash::insertMulti -> QMultiHash::insert
* QProcess::startDetached: non-deprecated overload
* QProcess::{pid->processId}
* QPainter::{HighQuality->}Antialiasing
* QPalette::{background->window}()
* Use Qt::{Background,Foreground}Role
* endl -> Qt::endl, flush -> Qt::flush
* Make YubiKey::s_interfaceMutex non-recursive
* OpenSSHKeyGenDialog: use non-deprecated QComboBox::sizeAdjustPolicy setting
2024-06-22 07:22:44 -04:00
Carlo Teubner
5bf5b93836 Passkey importer: fix file picker parent
When selecting "Database → Import Passkey", we show a file picker.
Previously, we did not specify a parent widget for it. This could have
undesirable effects on its presentation. (For example, with the Sway
tiling Wayland compositor, it would show the file picker as a tiled
window rather than a floating one.)

Fix the issue by passing in the parent widget. This is also in line with
all other usages of FileDialog::getOpenFileName() in this project.
2024-06-22 07:13:07 -04:00
Carlo Teubner
07f565aa49 Require Qt >= 5.12
Bump the minimum required Qt version up to 5.12, as per
https://github.com/keepassxreboot/keepassxc/issues/10859#issuecomment-2148477826.
Previously, the minimum version was 5.2.0 based on the CMakeLists.txt
check, though it's unclear if such old versions would actually work.

With this, we are able to remove a whole bunch of #ifdef'd code.
2024-06-22 00:01:23 -04:00
varjolintu
e6db2ce3b9 Passkeys: Fix showing correct username in the reports 2024-06-21 23:53:42 -04:00
AgostonSzepessy
1f9c25cc91
Show character count in password generator dialog (#10940)
Displays the number of characters in the password field in the password generator dialog. This fixes #10858.
2024-06-21 23:53:18 -04:00
Michal Suchanek
80ac50a144 Increase the time interval for window show workaround
When the keepassxc window is shown something generetes a hide event, and it is hidden again immediately.

The 50ms interval for avoiding hiding the window when shown is not enough, even on modern systems.

Make the interval longer.
2024-06-21 23:33:52 -04:00
Guido Falsi
f4b91c17a9
Correct libusb usage on FreeBSD (#10736)
Change type of Handle on FreeBSD. On FreeBSD the libusb_hotplug_register_callback() function uses a pointer to a struct as a handle.

---------

Co-authored-by: Janek Bevendorff <janek@keepassxc.org>
2024-06-19 16:50:56 -04:00
Carlo Teubner
9972b5f531
Fix Copy Password button when text is selected (#10853)
When the user chooses to copy the password for an entry to the clipboard, previously there was logic to check if text was selected, and if so, that text was instead copied to the clipboard. That made sense if
(a) the user invoked the Copy Password action via its keyboard shortcut, and (b) that keyboard shortcut was configured (as per default) to be Ctrl-C, i.e. the same as the system action for copy-to-clipboard.

However, it made no sense if the user invoked that action in some other way, for example by clicking the corresponding toolbar button.

It also made no sense in the case that the Copy Password action had some other keyboard shortcut assigned. Also, if some other action had Ctrl-C assigned, the logic would not kick in then.

Fix all of the above by modifying the keyboard shortcut logic to intervene precisely in the case where a shortcut is pressed that matches the system copy-to-clipboard shortcut; only in that case do we now check if text is selected and if so copy that to the clipboard instead of the action we would otherwise take.

Fixes #10734.
2024-06-19 08:03:42 -04:00
Carlo Teubner
24dc07897b Search entry: respect shortcut config on Copy key
If the system Copy key sequence (i.e. Ctrl+C or Cmd+C) is pressed while
inside the search entry without any text being selected, previously we
would copy the currently selected entry's password. This made sense when
keyboard shortcuts were fixed. Now that they are configurable, change it
to re-route the event to the main window, which can then take the
appropriate action (i.e. Ctrl+C might be bound to some other action).
2024-06-16 17:38:29 -04:00
Carlo Teubner
def56f745c App settings: fix widget tab order
Fixes #9765.
2024-06-16 16:49:50 -04:00
Jonathan White
2c0844807e Improve overall database settings behavior
* Fixes #10723 - only display password strength warning when actively editing the password
* Also improve behavior of minimum quality warning
* Improve behavior and handling of password changes with the database settings dialog
* Prevents loss of newly entered password when toggling between elements in the settings page
* On error, switch to tab that prevents saving database settings for easier correction
2024-06-16 08:43:09 -04:00
Jonathan White
2b08af712f Fix encryption settings behavior
* Fixes #10558
2024-06-16 08:43:09 -04:00
Jonathan White
f80e79f71a Improve CSV import when title field isn't specified
* Fixes #10433
2024-06-16 07:51:13 -04:00
Jonathan White
3662f6aa77 Improve handling of clipboard actions
* Fix #10804
2024-06-16 07:47:27 -04:00
Jonathan White
fbace75185 Fix password clear timer inconsistency
* Fixes #10695
2024-06-16 07:46:58 -04:00
Carlo Teubner
6c02c74539
MainWindow: move shortcuts from .cpp to .ui file (#10903)
* MainWindow: change Clone Entry shortcut to Ctrl+D from Ctrl+K
* MainWindow: move shortcuts from .cpp to .ui file

The only shortcuts defined in the .cpp file are ones that can't be defined in the .ui file, because they are in some way conditional. This also reduces the number of compiler warnings of the kind:

warning: arithmetic between different enumeration types ‘Qt::Modifier’ and ‘Qt::Key’ is deprecated [-Wdeprecated-enum-enum-conversion] with recent GCC versions.
2024-06-15 15:59:16 -04:00
varjolintu
647272e9c5 Fix typos in DatabaseSettingsWidgetRemote 2024-06-13 16:19:05 -04:00
sforst
1ca607792d
Support remote database access using external tools (#7222)
* Provide remote database sync capability

Allow arbitrary commands to be defined and executed for syncing databases with remote services. This includes sftp, scp, rsync, etc. 

Remote commands are stored per-database and sync operations are manually triggered by the user from the Database -> Remote Sync menu. 

---------

Co-authored-by: Stefan Forstenlechner <t-h-e@users.noreply.github.com>
Co-authored-by: Jonathan White <support@dmapps.us>
2024-06-13 06:23:41 -04:00
Kevin J
40f4428e36
Fix sidebar resize behaviour (#10641)
* Fix database view splitters resize behaviour
* Set default ratio sizes for first-run based on the size of the database widget itself
* Fix setting splitter sizes before database widget has had a chance to render for the first time
* Disallow collapsing the entry view (source of several bug reports)

Fixes: #10613

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2024-06-12 21:26:34 -04:00
Carlo Teubner
c3df16147d
Cleanup compiler warnings on all platforms (#10847)
Fixes #10730.

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
2024-06-12 21:25:15 -04:00
Carlo Teubner
ecdebd71c1 Fix file permissions for some files
Ensure that files that shouldn't be executable aren't.
2024-06-06 17:35:49 -04:00
Carlo Teubner
c81e4e1208 Remove zero-width space character from comments
Remove Unicode character U+FEFF ZERO WIDTH NO-BREAK SPACE from Weslly's
email address in a few places.

Not sure if this was done on purpose (anti-spam measure?), but it's not
consistently done anyway (e.g. wasn't the case in
src/gui/TotpDialog.cpp), so it seems cleanest to remove this.
2024-06-02 07:44:00 -04:00
Sami Vänttinen
5de669eb7b
Add action item for removing a passkey from entry (#10777) 2024-05-27 16:50:35 -04:00
Steve Mokris
20868ab3a2 Restore macOS monospace font size prior to #10282 2024-05-27 15:02:14 -04:00
Frans-Willem Post
c93eacd1d3 Prevent HTML overflow, fix issue #10647 2024-05-27 14:51:23 -04:00
Jonathan White
a5c7f7bb50 Fix Flatpak config issues
Remove #ifdef guards from Config.h/cpp (no harm to non-Flatpak distros)

Cleanup #ifdef usage in NixUtils.cpp
2024-05-27 14:50:57 -04:00
Alexandre Petit
8cd45f57b7
Fix SSH Agent broken decrypt button (#10638)
* SSH Agent: Fix broken decrypt button (Fixes #10637)

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2024-05-27 14:48:33 -04:00
Jonathan White
2a62000b28 Fix Alt modifier on Windows Auto-Type
* Fixes #10791
2024-05-23 10:59:36 -04:00
Jonathan White
3ace4c6cf5 Fix issues with Hardware Key auto detection
* Fix #10656 - Add a small delay when before auto-polling hardware keys to all them to settle immediately after plugging in. This resolves an issue where the key's serial number could not be resolved due to hardware timeout.
* Also fix use of uninitialized variable if polling serial number fails for whatever reason.

* Fix typo in macOS key registration code

* Prevent registering duplicate listeners on window focus. These were not de-registered because we didn't trigger on unfocus. Show/Hide are sufficient triggers to add and remove listeners.
2024-05-05 16:33:03 -04:00
Jonathan White
83623c896f Keep key file text when provided on command line
* Fixes #10552
2024-05-05 16:26:05 -04:00
varjolintu
92b30ae7ec Passkeys: Register to an existing entry 2024-05-05 13:53:43 -04:00
Jonathan White
bd449f3226 Fix issues with locking database
* Fix #6593 - force close any modal dialogs associated with a database widget that is being locked.

* Partial fix for #721 but doesn't address the problem of needing to save a modified entry or database while locking.

* Also improves import dialog behavior if databases(s) lock while it is visible.
2024-05-05 11:05:51 -04:00
Jonathan White
6b62beab6e Fix issues with Entry Editing
* Fix #10653 - prevent category switching if no category was actually hidden/visible. Also properly select a new category when a change is made instead of just changing the widget page.

* Fix apply button still being enabled after it is pressed and successfully committed
2024-05-05 11:05:51 -04:00
Jonathan White
3829bcdd8f Prevent KeeShare from merging database custom data
This issue previously caused parent databases to be marked as modified on unlock. This was because of the new protections against byte-by-byte side channel attacks adds a randomized string to the database custom data. We should never be merging database custom data with keeshare or imports since we are merging groups only.

Also prevent overwrite of auto-generated custom data fields, Last Modified and Random Slug.
2024-04-29 08:50:46 -04:00
Jonathan White
4f12f57a0b Open links and urls in AppImage
* Fixes #8721
2024-04-29 08:49:49 -04:00
Jonathan White
04fac249f9 Force clear clipboard on Wayland
* Fixes #4498
2024-04-29 08:49:49 -04:00
Jonathan White
13362c9142 Fix TOTP being visible on unlock when disabled in settings
* Fixes #9996
2024-04-28 18:21:52 -04:00
Jonathan White
9a65ffe972 Don't remember key file folder if disabled
* Fixes #10557
2024-04-28 18:16:24 -04:00
Jonathan White
19d4f7334c Correct minor issues in translations 2024-04-28 18:16:10 -04:00
Mikko Saarinki
a542ded97c
QMenubar option to show/hide itself (#10341)
--------

Co-authored-by: Mikko Saarinki <mikko.saarinki@michaelkingston.fi>
Co-authored-by: Jonathan White <support@dmapps.us>
2024-04-27 22:09:38 -04:00
Kevin J
4ef52c859b
Add hotkey for group switching (#10625)
* Add hotkey for group switching

Ctrl + Shift + Key_PageUp for previous group
Ctrl + Shift + Key_PageDown for next group
Fixes #4394
2024-04-27 10:22:18 -04:00
Jonathan White
7ae65dd656 Remove password repeat application setting
* This removes the application setting to require typing the password in again even though it is visible.
* Removed automatic password repeat when the password is made visible on changing.
2024-04-27 09:49:38 -04:00
Jonathan White
bb856f89b9 Only perform group sort when GroupView is focused
* Fixes #10195
2024-04-25 23:51:03 -04:00
Kevin Jerebica
994c5b733a Add hotkey for search-help
Add a new hotkey (CTRL+J) for toggling on/off
the search-help when you are in the search field
Fixes: #4100
2024-04-25 23:42:06 -04:00
Mathieu Oriol
d0e9f133b1 Use XDG Desktop Portal to autostart the flatpak 2024-04-25 23:41:31 -04:00
Jonathan White
35af1c6695 Fix focus loss when using Auto-Type from locked database
* Fixes #10439
2024-04-23 20:56:31 -04:00
varjolintu
41d00135af Passkeys: Fix duplicate database selection 2024-04-21 07:19:16 -04:00