Closes#10783
Adds three database configuration options (stored as public custom data) that allow a database to have a public name/summary, color, and/or icon to be displayed on the unlock screen. This information is configured in the Database Settings and stored in the database public custom data (ie, unencrypted).
The name/summary is stored in KPXC_PUBLIC_NAME, the color is stored in KPXC_PUBLIC_COLOR, and the icon is stored in KPXC_PUBLIC_ICON.
---------
Co-authored-by: Jonathan White <support@dmapps.us>
* Fixes#11000
When the screen locks on e.g. gnome we receive multiple independent signals of that, namely the Gnome session manager and the gnome / freedesktop screensaver.
When this happens, this causes multiple "lock database" requests to be issued. The first one correctly shows the question to discard/cancel, but the second one while the first is still asking goes and dismisses the question and then goes to ask it again. The result is it acts like you didn't answer correctly (ie, to cancel) and the database is locked.
* Closes#9452 - add import/export buttons to application settings
* Fixes#11120 - duplicate both menubar and toolbar visibility settings into the application settings
* Fixes#8561 - improve placement of various settings between General and Security pages
* Improve tool tip for backup database setting
* Improve wording of various settings
* Fixes#11044 - password generator excluded characters tooltip was incorrect
* Fixes#11084 - allow more than 30 days for showing expiring passwords. Also fix the ability to properly translate this control.
* Fixes#11212 - don't show password on creating new database
* Fixes#10726 - improve indication of hardware key polling. Also improve layout spacing of unlock dialog.
* Fixes#11142 - provide better link for challenge-response information
Replace a QVector for the wordlist with a QSet. This removes all duplicate entries in a given wordlist.
Thus, it hinders a malicious wordlist that has the proper length (>4000 entries) but with repetitions (effectively << 4000 entries) to be used and potentially create weaker passphrases than estimated.
Example:
List with 4000 items but only 64 unique words would lead to only 48 bit of Entropy instead of ~95 bit!
It turns out that the previous implementation, based on installing an event filter in every QAction instance, does not work on macOS, likely due to a Qt bug.
Attempt to work around this by using a different implementation of the same idea, by reacting to ShortcutOverride events in the MainWindow object.
Fixes#10929.
This PR splits the GUI source files from the core source files. The immediate goal is to allow the CLI to require only a minimum number of dynamic libraries. The long term goal is to create an architectural boundary around the core module, in preparation of libkdbx.
Fix a bug in the database key settings dialog, where it was previously
always incorrectly applying an empty password if the password was not
changed but some other change was made (e.g. adding or removing a key
file).
Previously, in a pattern like "{TIME:yy} {TIME}",
substituteBackupFilePath() would greedily use the entire string
"yy} {TIME" as the format specifier for the first TIME template, instead
of just "yy". Fix this, by adjusting the regular expression.
This ends up changing the behaviour of a weird corner case that is
covered in the tests, so change the test. I don't think anyone cares
about that case, and I think the current behaviour is better there.
Fixes#10505 (proved by adding a test case very similar to what was
reported there).
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>
* 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
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.