* Fix#5098 - Ensure advanced mode settings are saved distinctly from simple mode settings
* Make selected character groups pop out in the UI
* Improve layout of character options
The light and dark theme don't respond to Windows's high contrast
accessibility mode, so when the theme is set to "auto", we
default to "classic" instead of "light".
Fixes#5044
* Fixes#5081 - Initialize MessageWidget::m_animate prior to use
* Fixes#5021 - Don't change tray icon type with unfocused mouse wheel
* Fixes#5029 - Only use HighDpiScaleFactorRoundingPolicy::PassThrough on Windows platforms. Prevents significant scaling bugs on Linux. MacOS does not support fractional scaling.
Fixes#4444
Some websites these days do not present both the "username" and the "password"
input box on the same webpage (e.g. Google, Amazon). So no custom sequence is
possible to enter both the said attributes in one go.
So, two new context menu actions have been added:
1. Perform Auto-Type of just the username
2. Perform Auto-Type of just the password
These context menu actions are analogous to "Copy username" and "Copy
password", except it avoids sending all characters via clipboard.
* Create a sub-menu in the Context Menu of Entry.
* The sub-menu offers the following sequences:
- {USERNAME}
- {USERNAME}{ENTER}
- {PASSWORD}
- {PASSWORD}{ENTER}
Definitions:
* Database Key - Cryptographic hash used to perform encrypt/decrypt of the database.
* Database Credentials - User facing term to refer to the collection of Password, Key File, and/or Hardware Key used to derive the Database Key.
Changes:
* Remove the term "master" and "key" from the user's lexicon and clarify the code base based on the definitions above.
* Clean up wording in the UI to be clearer to the end user.
* Fix#4768
* MainWindow::updateTrayIcon() is called in MainWindow::applySettingsChanges() earlier in construction. Calling this function twice in a row causes issues with startup times on Linux.
* Added to the new view menu, show entry/group icons at 16px and reduce toolbar icons to 22px.
* Fix search widget being too large vertically (removed padding)
* Prevent double free due to QObject cleanup happening before/after the ExtraPage storing the QSharedPointer to FdoSecretsPlugin is deleted.
* Fixes#4877
Add a small delay between key polling to let the hardware interface settle. Prevents invalid serial numbers from being pulled messing up the KeePassXC workflow.
* Saving a database in unsafe mode retains the existing permissions on the kdbx file
* New databases (save as, save backup, new database) and new key files are saved with 0600 permissions (user read/write), fixes#2575
* Only clear password field when switching tabs or minimizing. This prevents the setting "Remember Key Files and Hardware Keys" from being useless with multiple databases.
* Convert key file field to Line Edit, simplifies usage. Fix clear field button as well.
* Removed need for clearForms to check if the database is being opened (was a solution to tab switching while unlocking, no longer a problem).
* Check every hour to see if another update check should be performed. Nothing actually happens unless 7 days has elapsed since the last update check.
* Fixes#3706
* Add support for 'ifDevice' feature, closes#2871
* Resolve placeholders for username and password to support references, fixes#2078
* Add support for open databases from an entry when the url starts with 'kdbx://'. Uses the same syntax as AutoOpen. Closes#1536.
* Move portable configuration files into a config subfolder from the executable. This prevents overwriting the stored config when the application is updated in-place.
* Use .portable file to signal a portable app
* Fix#4751
* Fixes#4060
* Also fix not emitting entryModified() when history is truncated. This possibly fixes other crashes with apply button when the history is truncated and then the history page is shown with a deleted entry.
* Fix issues when Config options were renamed
* Fix compile issues when using clang 10
* Rearrange database menu icons and import database menu icons
* Set minimum size of MainWindow to 800 to prevent search bar from hiding
* Fix not saving password generator options when closing the standalone generator
* Add headers to health check reports
* Don't show hidden content dots when notes are hidden but empty.
* Fix saving new database files in SMB shares on Windows, fixes#4809
* Gracefully handle duplicate attachments :
Instead of bailing out with an error, prepend a random string to the name of duplicate attachment records. This prevents data loss from other programs that mishandled KDBX XML writing. Fixes#2493
* Properly handle blocked import of signed KeeShare database, fixes#4413
The tray icon appearance setting is null by default, since we do not
want to include OSUtils into Config. As a result, we must take special
care to preselect the correct combo box entry on the settings page.
- Unify widget layouts and margins
- Fix tab order on a bunch of widgets
- Fix broken entry/group edit form layout and replace with grid layout
- Rearrange some settings for better logical grouping
- Fix some settings checkboxes not being enabled/disabled on load
- Fix "General" settings tab scrolling
- Rename "Root" group to "Passwords"
- Update demo.kdbx accordingly and redownload favicons
- Change entry path display to use slash separators
- Reduce Medium and Large icon sizes slightly
* Add icons for Database Import, Database Export, and Recent Databases
* Change app exit icon to be distinct from export icon
* Updated and ran makeappicons.sh
Original source of icons is the icon8 library (http://icons8.com/c/flat-color-icons) and Paomedia (https://github.com/paomedia/small-n-flat). All icons used are licensed MIT or CC0; annotated in COPYING.
* Closes#4071
* Increase default size of database icons to 24px and entry preview panel to 48px
* Add shell script to assemble the database icons
* Use QIcon to seamlessly support High DPI displays and pixmap caching
* Add badge support for KeeShare groups and expired entries.
* Guard against use of QPixmap::fromImage without a GUI
* Add SVG minify and improve `make icons`
Co-authored-by: Wolfram Rösler <wolfram@roesler-ac.de>
Transforms application into a UIElement agent app when
minimize to tray is enabled and the window is hidden.
This hides the dock icon and removes the application
from the Cmd+Tab listing. The changes work well together
with macOS's inbuilt hide feature.
Also fixes the buggy tray icon context menu trigger behaviour.
macOS triggers the tray context menu also on normal left
click, which causes the window to toggle at the same time
as the menu. To fix this, window toggling has been disabled
altogether on macOS and users will be shown only the context
menu from now on.
Fixes#1334
Introduce a third unsorted status that shows entries in the order they occur in the KDBX file.
* Add keyboard shortcut Ctrl+Alt+Up/Down to move entries up and down in sort order
* Add entry context menu icons to achieve movement up/down
* Only show menu icons when in natural sort order
* Add Material Design icons for moving up/down
* Add feature to track non-data changes and force a save on exit to ensure they are not lost when locking a database. This allows users to make entry movements and group expand/collapse operations and not lose that state.
Remove saveas
* Don't send database locked/unlocked messages when "search in all databases" is enabled
* After access control dialog closes, only hide main window on macOS, and then only if previously hidden.
Add an option in the 'Database' menu to save a backup of the current database.
Add unit test for saving database copy
* Open a test database, mark it as modified, and save a copy
* Fail if the copy is not a valid database
* Fail if the original database is saved
* Fail if the original database is no longer marked as modified
* Override Qt's default [broken] behavior of handling Tab/Shift+Tab to navigate around the MainWindow. Completely fixes trapped focus.
* Improve handling of search results when navigating the UI.
* Fix selecting first entry after ending a search.
* Add keyboard shortcuts to directly focus on search (F1), Group List (F2), and Entry List (F3)
* Fixes#2878, #4636, and #4221
* Significantly improve user experience when using hardware keys on databases in both GUI and CLI modes. Prevent locking up the YubiKey USB interface for prolonged periods of time. Allows for other apps to use the key concurrently with KeePassXC.
* Improve messages displayed to user when finding keys and when user interaction is required. Output specific error messages when handling hardware keys during database read/write.
* Only poll for keys when previously used or upon user request. Prevent continuously polling keys when accessing the UI such as switching tabs and minimize/maximize.
* Add support for using multiple hardware keys simultaneously. Keys are identified by their serial number which prevents using the wrong key during open and save operations.
* Fixes#4400
* Fixes#4065
* Fixes#1050
* Fixes#1215
* Fixes#3087
* Fixes#1088
* Fixes#1869
* Removed option to attach KeePassXC to the browser extension. Users must use the proxy application to communicate with KeePassXC.
* Significantly streamlined proxy code. Used same implementation of stdin/stdout interface across all platforms.
* Moved browser service entry point to BrowserService class instead of NativeMessagingHost. BrowserService now coordinates the communication to/from clients.
* Moved settings page definition out of MainWindow
* Decoupled BrowserService from DatabaseTabWidget
* Reduced complexity of various functions and cleaned the ABI (public vs private).
* Eliminated BrowserClients class, moved functionality into the BrowserService
* Renamed HostInstaller to NativeMessageInstaller and renamed NativeMessageHost to BrowserHost.
* Recognize XDG_CONFIG_HOME when installing native message file on Linux. Fix#4121 and fix#4123.
Fixes#3398.
Convert to QTextStream for all CLI IO and greatly improve CLI tests
* Completely overhaul CLI tests to be much more streamlined and easy to read. Removed unnecessary code blocks by using existing functions.
Co-authored-by: Emma Brooks <me@pluvano.com>
* Fix various bugs in opvault parsing to include: TOTP parsing, date handling, naming convention, attachments, and multiple url's.
* Remove category groups that don't have any entries.
* Simplify tests by focusing on the resulting database instead of the parsing mechanics.
* Remove proprietary "freddy" opvault in favor of self-made "keepassxc" opvault.
* Fix#4069, select opvault file on macOS
* Fix#3790, shares now use the standard FileWatcher class to detect remote file changes using checksums and file system triggers.
* Fix#3895, macOS file selection no longer hangs the app.
* Restore saving of KeeShare settings accidentally removed by 596d2cf
* Fixes#4168
* Introduce a custom data element stored with an entry to indicate that it is a "Known Bad" entry. This flag causes database reports to skip these entries.
* The current number of known bad entries is displayed in the statistics report.
* Add context menu to reports to easily exclude entries.
This option didn't work properly when "Hide window to system
tray when minimised" was also enabled.
I don't see a particular reason why Windows shouldn't be calling
hideWindow() like all other platforms. hideWindow() takes care of
choosing the correct minimisation mode based on the user's settings.
* Include checkboxes to install a desktop shortcut (default no) and start on login (default yes)
* Fix closing KeePassXC.exe and keepassxc-proxy.exe before installation starts
* Improve styling of launch after exit checkbox
- Sizes are displayed in B, KiB, MiB, and GiB with 2 significant
digits after the decimal
- Column is hidden by default
- TestEntryModel updated for testing proxy model
Replaces all string configuration options with enum types
that can be checked by the compiler. This prevents spelling
errors, in-place configuration definitions, and inconsistent
default values. The default value config getter signature was
removed in favour of consistently and centrally default-initialised
configuration values.
Individual default values were adjusted for better security,
such as the default password length, which was increased from
16 characters to 32.
The already existing config option deprecation map was extended
by a general migration procedure using configuration versioning.
Settings were split into Roaming and Local settings, which
go to their respective AppData locations on Windows.
Fixes#2574Fixes#2193
Hard-coded widget state colours (error, warning, health etc.)
are replace by a central palette class, which also takes care
of determining if KeePassXC is in dark or light mode.
Colours expected to be used as background for normal text
were tested for WCAG level A compliance. Health colours were
adjusted for better harmony with the application theme and
tested for sufficient contrast with a colour blindness simulator.
* Changed style so that only default buttons have full background highlight. This prevents confusion as to which button in various dialogs is the default/desired choice.
* Move password generator popup into static function outside of PasswordEdit so other parts of the program can easily access it.
* QDialog forces 'autoDefault' property on all buttons causing them to obtain background highlight when they are focused. Moved Password Generator outside of a QDialog and forced 'autoDefault' to false on Browser Access Dialog.
* Fixed button ordering in Totp Setup Dialog
* About dialog close button is now the default button
Fixes#4407Fixes#4637
Additional changes:
- Fix reference entry colour being incompatible with dark themes
- Fix QWizard page being too bright in dark mode
- Prevent unfocused wheel scroll changes to theme setting
The recent macOS security patch renders our codesigning
"fix" of setting the sandbox entitlement to false twice
unusable. This patch adds a full provisioning profile
and adjusts the signing procedure to not include
entitlements for Qt frameworks.
The patch also changes the app and bundle ID, so granted
accessibility privileges have to be granted again after
installing the update.
Fixes#4398Fixes#4515
* Prevent using double memory when benchmarking Argon2 performance.
* Improve benchmark results by not overusing CPU and memory simultaneously. Parallel benchmarks were causing artificially strained calculations resulting in a lower than desired number of rounds.
* Fixes#1083
* Add online HIBP checker dialog to the database reports widget. Permission is requested from the user prior to performing any network operations.
* The number of times a password has been found in a breach is shown to the user.
* If no passwords are breached then a positive message is presented.
* Source of HIBP icon: https://github.com/simple-icons/simple-icons/blob/develop/icons/haveibeenpwned.svg
Authored-by: Wolfram Rösler <wolfram@roesler-ac.de>
Co-authored-by: Jonathan White <support@dmapps.us>
* Add ability to create database with an empty password
* Add password repeat check
* Standardize process between `db-create` and `import` commands
* Improve db-create tests with new password repeat
Co-authored-by: Jonathan White <support@dmapps.us>
* Use KeePassXC executable icon for the start menu shortcut on Windows to prevent the icon from being deleted on installation of a new version. Fixes#4226
* Support improvements to windeployqt in Qt 5.14.1+
See issue #3271 for a motivation of this feature.
This patch adds an additional text input to the advanced view of the password generator. All characters of this input field (if not empty) will be added as another group to the password generator. The characters from the excluded field have precedence over the characters from this new field, meaning any character added to both fields will *not* appear in any generated password. As the
characters from this new field will be added as their own group to the password generator, checking the 'Include characters from every group' checkbox will
force at least character to be chosen from the new input field.
The `PasswordGenerator` class has also been changed so that the `isValid` method returns `true` if only characters from the new input field would be used.
There is a new, simple test that covers the new feature. While the test only uses ASCII characters, any Unicode characters can be used with the new feature.
* Remove repeat password on entry edit
* Move show/hide password and password generator buttons into the field as actions.
* Register keyboard shortcut Ctrl+H to toggle password visibility
* Register keyboard shortcut Ctrl+G to open the password generator
* Cleanup code and improve interactions between elements
* Simplify Password Generator button layout; convert advanced mode button to toggle button
* Update GUI tests
* Fixes#4120
* Add function to Application to quickly determine if in light or dark theme
* Add kpxcApp symbol
* Explicitly define main function for GUI tests to improve performance and use custom Application.
* Wrap key transformation in AsyncTask when reading a database. Significantly reduces user interface lockup.
* Replace root group with new group instead of deleting the pointer (fulfills member validity promise).
* Add saving mutex to database class to prevent re-entrant saving
* Prevent saving multiple times to the same file if the database is not marked as modified
* Prevent locking the database while saving. This also prevents closing the application and database tab while saving.
* FileWatcher: only perform async checksum calculations when triggered by timer (prevents random GUI freezes)
* Re-attempt database lock when requested during save operation
* Prevent database tabs from closing before all databases are locked on quit
Fixes#466
So it can be displayed in the autocomplete list when more than
one login matches. For users that use groups and have similar names
for multiple logins but organized in different groups
* Clean up parent alignment code
* Don't hide widget if it currently has focus
* Use Qt::Tool window type on macOS as well. This prevents the popup help from hiding to the background if the main window has focus.
* Fixes#2814
Moves MacUtils into a separate sub folder and adds
WinUtils, NixUtils, and OSUtils for platform-native
code on Windows, Unix-like, and generic/all systems.
The GUI features depend on windowing system used, not just OS.
There is an issue with the WM sometimes producing an event that keepassxc interprets as request to hide the main window just after it is shown. A workaround with immediately firing a timer was implemented. However, there is no guarantee on execution ordering of the timer callback and other application code. Remove the timer and override
show() and hide() on main window to only hide if the window has not been shown recently.
The user can set an option to hide window instead of minimizing when tray icon is enabled. This is not honored in most places where the main windows is minimized. Fix it. This also allows using the tray icon as a workaround for minimization not working under some circumstances in X11.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
* macOS and Windows browsers do not use `Alt+#` to change tabs. Windows uses `Ctrl` and macOS uses `Command`. Linux uses `Alt`.
* Remove shortcut for `Key+0` and assign `Key+9` as last tab selection
* Streamline tab selection code in MainWindow
The way the class is currently being used, the cache never does
anything (because evaluate is never invoked twice for the same
entry), so according to YAGNI it has to go.
Fixes#551
Introduce a password health check to the application that evaluates every entry in a database. Entries that fail various tests are listed for user review and action. Also moves the statistics panel to the new Database -> Reports widget. Recycled entries are excluded from the results.
We now have two classes, PasswordHealth to deal with a single password and HealthChecker to deal with all passwords of a database.
Tests include passwords that are expired, re-used, and weak.
* Closes#551
* Move zxcvbn usage to a centralized class (PasswordHealth) and replace its usages across the application to ensure standardized interpretation of entropy calculations.
* Add new icons for the database reports view
* Updated the demo database to show off the reports
* make Clip accept an attribute name
This allows users to copy arbitrary attributes (e.g. username, notes,
URL) to the clipboard in addition to the password and TOTP values.
* update Clip manpage
* Add findAttributes to CLI utils
* Use case-insensitive search in Show command.
* Use case-insensitive search in Clip command.
Co-authored-by: louib <L0U13@protonmail.com>
With the Material Design icons, any other icons brought in through
the system icon theme will look inconsistent.
Also remove the KEEPASSXC_IGNORE_ICON_THEME environment variable
(which was introduced during development of the new icons to
disable the system icon theme and is thus no longer needed).
Fixes#475
Added an option to set the target decryption time on database creation
for the CLI create command. This required some refactoring, in
particular the extraction of the min, max and defaut decryption times in
the `Kdf` module. Some work was done to allow changing those constant
only in the `Kdf` module, should we ever want to change them.
Removes unnecessary & from strings in settings widgets. These cause confusion and complicate translation. They are unnecessary as all dialogs allow efficient tabbing between elements.
Also add colons after several settings with input boxes and remove a hard stop.
Improve wording of strings based on translator feedback.
Fix case sensitive matching of CLI Export.
- Remove duplicate code to load a key (EditEntryWidget & SSHAgent)
- Refactor all key loading and saving to KeeAgentSettings
- Depend only on Entry to allow future CLI expansion
* Fix#4079 - proxy host would get stuck trying to read characters from stdin. Switch to "readsome" which does not block if there are not enough characters to read. Added a longer delay to slow the checking loop down.
* Prefer clearing clipboard by explicitly setting the clipboard to an empty string. Qt's QClipboard::clear() method is unreliable under X11 environment.
* Fixes#4126
* Fix#4093 - The first entry in the list is selected after deleting an entry
* Prevents crashes due to dangling pointers held by the Entry Preview Widget when entries were deleted.
* Improve GUI tests to ensure this new behavior occurs.
It's used extremely rarely, having it in such a prominent position
in the tool bar isn't justified. Also, with the Material Design
icons, its tool bar icon can easily be confused with "create new
entry".
Fixes#475
Use the following to run KeePassXC with the icons from the
source code, ignoring the operating system's Qt icon theme:
```
KEEPASSXC_IGNORE_ICON_THEME=1 keepassxc
```
The patch further adds a script `makeicons.sh` that re-creates KeePassXC
icons from the Material Design icon set and can be used for easily
updating icons in the future. Instructions are in the script.
Fixes#475
The challenge-response key buffer is explicitly cleared
before the key transformation if no such key is configured
to ensure one is never injected into the hash even if the
database had a challenge-response key previously.
This patch also adds extensive tests for verifying that a
key change will not add any expired key material to the hash.
Fixes#4146
* Remove deprecation warnings when not doing a DEV_BUILD. Qt 5.14 introduced several deprecation flags on basic function calls in QList and QSet that would require several #pragma ignores. Assuming this was in preparation to Qt 6.0.
* Remove unnecessary assert in PasswordEditWidget that was hit in macOS debug builds.
- Use proper model for database and session in settings page
- Fix button text (unlock/lock) not changed according to the database locking status
- Fix button icons not present on icon themes other than Breeze
- Fix the disconnect button may got clipped when new session opens
Rename 'k' to 'f' because 'k' is already used to specify the key for the target database of the merge
* Remove short -f option from keepassxc-cli.1
* Remove -f option from keepassxc-cli merge
* Add test cases covering cli options for merge
* Add functional test for merge with keys
This commit reverts #3357.
The previous PR is for the new symbol NSEventMaskKeyDown, which is
introduced in #3347. In #3794, #3347 is reverted, so the workaround
in #3357 is no longer needed. Furthermore, it causes build failures
on 10.11 (#3932) as the header file for type NSEventMask is removed
in #3794, too.
Note that this is not a complete fix. A complete patch can be found
at [1]. In MacPorts, the OS version for building a package is the same
as the OS that installs it, so #ifdef can be used to replace @available.
The latter language feature is not available until Xcode 9.
With the patch mentioned in the previous paragraph, KeePassXC 2.5.1
can be built on Mac OS X 10.9 or newer.
Ref: #2899
[1] de1bb703ad/security/KeePassXC/files/patch-old-mac.diff
This makes most tests run successfully with asan.
The GUI tests still have a bunch of leaks, some from library code, and
some that look real but which I didn't immediately manage to figure out.
* TestOpVaultReader: use QSharedPointer
* Fix#3933 and fix#3857. Interaction with entries and groups is disabled while the database is being reloaded or saved to prevent changes from occurring. Prevent the database from being reloading if an entry or group is currently being edited.
* Fix#3941 - Only notify components when the database file actually changes (determined by checksum). This prevents spurious merge requests when the file is merely touched by another service (e.g., DropBox).
* Fix code format of ElidedLabel.cpp
* Mark the database as clean after fully completing the file save operation INSTEAD of when merely writing the database to a file.
* Stop the modified timer when marking the database as clean, this prevents latent erroneous modified signals from being emitted.
* Do not restart the modified timer after a new change is detected while it is still running.
Adding a new line after the message "Evaluating database entries against HIBP file, this will take a while..." helps
to separate a report and the comment.
Adding a new line after the message "Evaluating database entries against HIBP file, this will take a while..." helps
to separate a report and the comment.
* Fix#3701 - replace QLabel with QTextEdit to enable scrolling of notes
* Notes are plain text. They will remain as plain text and hyperlinks will not be enabled in the notes. Until the notes editor is moved to a rich text / html editor this will remain the case.
* Convert username and password fields in preview pane to QLineEdit's to allow for full copying and viewing if larger than the field width.
* Fix#3688 - hide the sequences column if all of the entry matches return the same sequence. This cleans up redundent data in the Auto-Type selection dialog introduced in 2.5.0.
The transformed secrets were stored in normal QByteArrays,
which are at risk of being swapped out. We now use secure
PasswordKey objects instead. There are still a few areas
where QByteArrays are used for storing secrets, but since
they are all temporary, they are less critical. It may be
worth hunting those down as well, though.
When we lock a database, we reset the database pointer to
free its resources. Since various other widgets besides the
DatabaseWidget hold references to the shared pointer object,
however, it cannot be guaranteed that the actual database
object will be freed right away. This patch adds a releaseData()
method which is called upon database lock to ensure all
residual data is cleared without having to rely on the actual
database object being cleaned up.
* Fix#3754 - Accept valid TOTP keys that require padding when converted to Base32.
* Allow use of spaces and lower case letters in the TOTP secret key.
* Fix#3334 - AutoOpen is now processed after the database widget is put into view mode to prevent infinite recursion of unlock attempts if two databases auto open each other.
* Fix#3735 - Don't focus on OpenDatabaseWidget fields that are not visible; ensures password field is focused after database lock.
* Fix#3487 - Password input is selected after failed unlock.
* Fix#1938 - Password input is focused after toggling visibility using the keyboard
This is just a cosmetic change. On KDE Plasma, the title of the tray icon is set by either the name of the binary, or by calling `setApplicationName()`. So having it properly stylized looks better.
* FdoSecrets: create prompt object only when necessary
* FdoSecrets: negotiationOutput should always return a valid QVariant otherwise QDBus will fail to create a reply, causing timeout in client.
* FdoSecrets: include in debug info
The new unlock dialogue seems to confuse users
as to what the purpose of the key file is. This
patch changes the generic "Select file..." affordance
to the more explicit "Select key file..." and adds
a help button to the label just like the one we
already have for the hardware key. Furthermore,
it prevents the user from using the KDBX file as its
own key file (since that would never work anyway).
The change breaks existing translations on purpose
(instead of simply adjusting the en_US locale)
in order to force translators to update this string
for their languages.
Resolves#3678
This is required to show the keepassxc icon on Wayland windows in a
Plasma Wayland session.
kwin_wayland fetches application icons from .desktop files and it
expects the desktop filename to be set on the QGuiApplication instance.
Without this, kwin sets a generic Wayland icon as fallback.
One some operating systems malloc(3) is not in malloc.h nor in
malloc_np.h, instead it is in stdlib.h.
In addition, not all systems support malloc_usable_size(3). You could
argue it's not safe.
This patch tries to be portable and it fix the build on OpenBSD.
* Fix#3699
Reduce file watch hashing of open database files from every second to every 30 seconds. Additionally, only hash the first 1024 bytes of the database file. This is valid since most of the header and the entire encrypted portion are changed significantly on every save.
* Fix#3550
* Default memory reduced to 64 MiB (from 128 MiB) and parallelism reduced to 2 threads. This allows for desktop and mobile device compatibility.
Resolves#3410.
Additionally, "fix" main window toggling behaviour when
clicking the tray icon while the window is visible, but
not in focus (e.g. hidden by other windows). On platforms
other than Windows, the window is now brought to the front
if it does not already have focus or is toggled otherwise.
Remove obsolete Windows session end handling code.
* Add a missing include in src/core/Alloc.cpp
On Mac OS X 10.11 with Xcode 8.2.1, building fails with
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_security_KeePassXC/KeePassXC-devel/work/keepassxc-f726d7501ff7e8a66ae974719042f23010716595/src/core/Alloc.cpp:44:10: error: no type named 'free' in namespace 'std'
std::free(ptr);
~~~~~^
Per [1], std::free() needs #include <cstdlib>. That file is included
indirectly on newer systems.
* Avoid const Signature object in src/keeshare/ShareExport.cpp
After the above issue is resolved, building fails at
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_security_KeePassXC/KeePassXC-devel/work/keepassxc-f726d7501ff7e8a66ae974719042f23010716595/src/keeshare/ShareExport.cpp:152:29: error: default initialization of an object of const type 'const Signature' without a user-provided default constructor
const Signature signer;
^
Apparently this is related to C++ defect 253 [2]. From the code,
creating a Signature is not needed as all methods in Signature are
static, so just call the method.
[1] https://en.cppreference.com/w/cpp/memory/c/free
[2] https://stackoverflow.com/a/47368753
if KeePassXC is compiled with WITH_XC_KEESHARE=OFF, the "Share" tab of
the EntryPreviewWidget for groups is removed from the GUI completely.
closes#3619.
this is a fix for an obvious regression. there was some refactoring
going on around here since the 2.4.3 release, and the return value of
ShareExport::intoContainer has since been neglected. with this change
the info banner showing errors/warnings/info/success after exporting a
database tree with KeeShare is shown again.
* Fix#3651
* Correct data loss when the database reloads due to a file change while creating a new entry. The issue occurred due to the "new parent group" pointer being invalid after the database is reloaded following merge.
* Also fix re-selecting entries following database file reload. If the entry was moved out of the current group it would result in an assert hit. This fix prevents recursively looking for the entry.
* Fixes#2813
Added special context menu for entries to move the most-used actions to the top.
Re-ordered actions in the entry menu to be more user friendly.
* Fixes#2118
Enables select entry actions when editing an entry. This allows users to copy the password of the entry, for example.
Note: unsaved changes to the entry will not be copied to the clipboard.
* Fix#3506
* Fix#2389
* Fix#2536
* Fix#2230
Every database that has been opened now watch's it's own file. This allows the database class to manage file changes and detect fail conditions during saving. Additionally, all stakeholders of the database can listen for the database file changed notification and respond accordingly.
Performed significant cleanup of the autoreload code within DatabaseWidget. Fixed several issues with handling changes due to merging, not merging, and other scenarios while reloading.
Prevent database saves to the same file if there are changes on disk that have not been merged with the open database.
Fixes#3365
Add prompt to delete the recycle bin when disabling it. If the user chooses not to delete it, the recycle bin will be suffixed with "(old)" and the icon changed to the default group icon.
Also moved recycle bin creation within the database class where it belongs.
* Fix#3142 - Warn user when entering invalid TOTP secret key.
* Fix#773 - The TOTP dialog now listens for the copy shortcut without having to press the Copy button.
* Add ability to choose hash algorithm from the TOTP setup dialog
* Add upgrade to "otp" attribute when custom attributes are chosen to prevent data loss
Ran make format
* Fix#3351
On macOS, entry specific Auto-Type (Cmd+Shift+V) now raises the last active window before lowering the KeePassXC window. This improves accuracy of the window that is actually typed into.
* Fixes#398
The new Browser Integration entry settings page has a list view with any additional URL's. These URL's are added to the entry attributes with KP2A_URL_<counter>, which means those are directly compatible with Keepass2Android.
* Fix#3609 - Request screen reader permission by faking a 1px screenshot. Thanks to MacPass for this idea.
* Fix#3578 - Remove duplicate sandbox entitlement
* Fix#3270 - Use executable path reference for libquazip
The CLI now contains an "import" command that creates a new database from the specified XML export. The new database is in kdbx 4 format, and does not currently accept a keyfile in database creation.
This change is required to create new databases from XML backups.
Fixes#2458
Added new page "Statistics" to the Database Settings dialog that shows information like number of groups and entries, number of unique and re-used passwords, average password length, etc.
Show warnings for problematic values with explainations for the user in tooltips.
Fixes#2034
Database statistics icon:
Downloaded from: https://www.flaticon.com/authors/freepik
Original source: https://www.flaticon.com/free-icon/bars-chart_265733
* Add test for (unwanted) history timeinfo update when cloning entries.
* Add timeInfo test for clone with rename.
* Fixed modification time update when cloning an entry with renaming.
This change adds support for hyperlinks in the notes field of the EntryPreviewWidget. This is done by enabling the `openExternalLinks` property of `QLabel`, and modifying the value of the content of this field so that links are wrapped
with `<a>` tags.
Links are assumed to use the format: `protocol://path`, since assumptions cannot/shoudn't be made about the specific format of a link. The text of the label uses the modified notes value.
This change adds a GNU Readline-based interactive mode to keepassxc-cli. If GNU Readline is not available, commands are just read from stdin with no editing or auto-complete support.
DatabaseCommand is modified to add the path to the current database to the arguments passed to executeWithDatabase. In this way, instances of DatabaseCommand do not have to prompt to re-open the database after each invocation, and existing command implementations do not have to be changed to support interactive mode.
This change also introduces a new way of handling commands between interactive and batch modes.
* Fixes#3224.
* Ran make format
* Changed `Extract` to `Export` to support additional formats
* Allow database expot as CSV. Added a `--format` option to the `Export` command for that, which defaults to xml, so the current behavior is unchanged.
*The `CsvExporter` had to be refactored a bit, but nothing major. It can
now print to a file or return a string.
Avoids prompting the user for a password if unlocking is likely to fail
due to some problem with the database file (i.e. not found, not a file,
not readable).
Add unit tests.
This allows `t:word` instead of `title:word` and `p:word` instead of `password:word`, and so on. The rule is that an abbreviated name expands to the first field name that starts with it, with exceptions
`u:` expanding to `username:` instead of `url:` and `pw:` expanding to `password:`.
* Fix#3376. Set font for password preview to Font::fixedFont()
* Add a menu entry opening the shortcuts documentation in the browser
* Fixed duplicate item in CLI documentation
Summary of changes:
* Extract function for creating password generator from options into
`Generate` command. This function is now reused in `Add` and `Edit`
commands.
* Updated manpage with missing password generation options.
* Updated manpage with missing longer forms of password generation options.
* Added unit tests for new password generation options in `Add` and
`Edit`.
* Handle case when `-g` and `-p` options are used at the same time.
This PR adds password generation functionalities while reducing
code duplication, but at the cost of 2 small breaking changes:
* The password generation option for `Add` and `Edit` for specifying
password length is now `-L` instead of `-l`, to not clash with the
`-l --lower` option.
* The `-u` shorthand for the `--upper` option has to be removed, to not
clash with the `-u --username` option.
* Add -U variant for uppercase.
* QFileDialog returns UNIX paths, even on Windows. This patch converts what QFileDialog returns to the native path format.
* Improve const correctness
* Avoid imposing file extension on Linux
* This patch improves things like unneeded passes by values, missing const qualifiers, ugly copies because of variable reuse and consistency in variable names.
* Fix#3407
* Read-only files now disable auto-save and show as modified correctly. This allows the GUI to prompt to "save-as" instead of silently discarding changes when the read-only database is locked or closed.
* Add application settings reset button
- Corrects accessibility findings GP.2
* Use icons in addition to color to indicate password mismatch
- Corrects accessibility finding CN.2
* Announce begin/end of list navigation
- Corrects accessibility finding KF.4
* Fixes for keyboard navigation
- Add Ctrl+F10 keyboard shortcut to show group/entry context menus. Fixes#3140
- Improve movement between form fields
* Fix loading system-defined language in translator
- Fixes#3202
- Bypass built-in Qt loading of QLocale for translations. The order of loading languages doesn't consider all file names prior to moving to the next language in the list. This resulted in English being chosen no matter what language is the top priority.
* Improve message box defaults and fix documentation links
* Better support for screen readers
* Add accessible names on form fields
* Prevent changing values during settings widget scrolling
- Add an event filter to combo boxes and spin boxes on the settings page to prevent the mouse wheel from changing the values without having focus
- Add horizontal stretch to the security settings to make the spin boxes more manageable.
* Empty destructors are replaced with default destructors
* A few loop variables made into const references to avoid copies
* Add missing `override` spec for some `Command::execute` methods
* Selecting one or more entries to download icons always forces the download (ie, if a new URL exists the new icon will be downloaded and set)
* Instead of downloading for each entry, the web url's are scraped from the provided entries and only those urls are downloaded. The icon is set for all entries that share a URL. This is useful if a group contains many entries that point to the same url, only 1 download call will occur.
* The icon download dialog displays whether you are doing one entry, many entries, or an entire group. It is also modal so you have to dismiss it to use KeePassXC again.
* Moved DuckDuckGo fallback notice into the download dialog.
This adds support for OnlyKey and requires yubikey-personalization library 1.20.0 or newer. The function yk_open_key_vid_pid was added to yubikey-personalization in version 1.20.0.
This new subcommand checks all passwords in the given database against a given list of SHA-1 password hashes. Such lists are available from the "Have I Been Pwned" project at https://haveibeenpwned.com/Passwords.
Note that this support offline checking only. The HIBP project also provides a web API for checking specific hash ranges; this is not currently supported.
Updating mingw-w64-x86_64-qt5 to version 5.12.4-2 caused EditEntryWidget to fail
building. Fixed that with proper includes. Also ran `make format` which revealed
one file in need of formatting.
* Fixes#3126
* Limit autocompletion to the top ten used usernames
- Load common usernames when database is opened
- Transition from QLineEdit to QComboBox for usernames
- Dropdown menu of the combobox lets user choose a common username
- Common usernames are autocompleted via inline completion
- Common usernames are sorted by frequency (first) and name (second)
* Add notes to General tab
* Combine Attributes and Attachments tabs into Advanced
* Remove extra viewTotpWidget
* Shrink minimum size of preview panel
With this change we get rid of the confusing key component checkboxes.
Now a component is either there or not (if left empty). There is
no redundant distinction between "unset" and "emtpy" anymore.
For compatibility with older databases that have "empty" passwords,
KeePassXC will ask if the user wants to retry with an empty password
if unlocking failed and the password field was left blank.
Besides these functional changes, the widget's layout has been
rearranged to be more compact, less stretched out (e.g. input fields
do not fill the full window width anymore), and more user-friendly
by providing a help tooltip for the hardware key field and accessible
descriptions for screen readers.
* Moved KeeShare Quiet Success message setting to the KeeShare portion of the application settings
* Removed an assert that caused the application to crash in debugging when a share file could not be found
* Corrected database settings security icon
* Unbreak build on FreeBSD
```
In file included from src/core/Alloc.cpp:24:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
^
src/core/Alloc.cpp:65:28: error: use of undeclared identifier 'malloc_usable_size'
::operator delete(ptr, malloc_usable_size(ptr));
^
2 errors generated.
```
Non-standard APIs like `malloc_usable_size()` [1] are defined in
`malloc_np.h` on FreeBSD, so use it instead of `malloc.h` there.
[1] https://man.freebsd.org/jemalloc(3)
* Allow Browser HostInstaller to work on FreeBSD and other OS's
* Drop custom GNUInstallDirs cmake module and use cmake's own module
It seems to be an outdated version and cmake generally provides it
itself, so there should be no need for keepassxc to provide its own
custom version.
On FreeBSD this fixes the issue that man pages were installed into
the wrong directory, i.e., `/usr/local/share/man` vs `/usr/local/man`
as per FreeBSD's current packaging policy.
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
* Replace placeholders in URLs copied from popup menu on the entry preview widget.
* Replace placeholders in URLs opened by double-clicking URL field in the entry table.
* Pass correct entropy amount to keepassxc-browser instead of amount of bits for both password and passphrase.
* Rename json key from "login" to "entropy" (keeping "login" key for backwards compatibility).
* Also make some changes to entropy calculation methods:
- Rename PassphraseGenerator::calculateEntropy to estimateEntropy
- Rename PasswordGenerator::calculateEntropy to estimateEntropy
This change adds a right-click context menu to the
AutoType dialog, which allows the user to copy
either the username or password. The dialog then
automatically closes.
* Add combo menu button to apply an icon to children
- allow more options to apply icons (child groups, child entries)
- extend tests in TestGroup (applying icons for groups/entries only)
- prevent blue folder icon being set for entries (on entry creation only)
* Do not show the combo menu button for entries
* Fixes#925
* Add 'flatten' option to CLI ls command
* Add test for Group::hierarchy() and man page for ls --flatten
* Rename group sort test to align with others
This PR cleans up the `Command` classes in the CLI, introducing a
`DatabaseCommand` class for the commands operating on a database,
and a `getCommandLineParser` command to centralize the arguments
parsing and validation.
The opening of the database based on the CLI arguments and options
is now centralized in `DatabaseCommand.execute`, making it easy to
add new database opening features (like YubiKey support for the CLI).
Also a couple of bugs fixed:
* `Create` was still using `stdout` for some error messages.
* `Diceware` and `Generate` were not validating that the word count was an integer.
* `Diceware` was also using `stdout` for some error messages.
KDE does not take focus from the current active window when the tray
icon is clicked. This prevented toggling the window (always called bringToFront).
Checking if the window is active corrects this issue.
Fixes#3256, fixes#3214.
* Fix remaining issues with menu keyboard navigation
* Entry menu now locks focus on entry when used from menubar
* When using keyboard navigation to select menubar menus,
do not lose focus on selected entry (fixes#3246)
* Enable all entry keyboard shortcuts while in search (fixes#3034)
* When the search text edit has focus, retain selected entry keyboard
shortcuts and button pressing capability
* Fixes#3145
The system tray menu used to have three items (toggle window,
lock database, quit) of which only two had an icon, which
looked strange and unintended. This commit adds an icon for
the "Toggle window" menu item.
* Use a padlock icon for the "Lock DB" tray menu item
Originally, icon `document-encryt.png` was used, however theming seems
to be getting in the way by sometimes displaying a plain "document"
icon instead. Copied the icon files to `database-lock.png` and used
that one for the "lock database" tray menu item instead.
* In Database Settings, use the "security-high" icon for "Security"
Previously, the "document-encrypt" icon was used, which should be
something like a padlock but which, due to theming, somethings
fell back to a generic document icon (page of paper).
The "document-encrypt" icon is no longer used and was removed.
* Fixes#3141
* Clearing the entry edit widget prior to emitting the editFinished signal caused the widget to be marked modified and prevent new entries from being created. Use an explicit boolean to notify commit success.
* Don't clear password generator on canceling a cancel
* Don't discard changes if saving from a cancel produces an error
* Fixes#2692
* KeePassXC was ignoring OS close messages on shutdown or logoff when minimize to tray on close was enabled. This change causes a second close message (when KeePassXC is hidden to the tray) to actually exit the application.
* Fixes#2838
* When navigating the entry context menu with up/down arrow the options would disable due to losing focus on the EntryView. This change preserves the "focus" during this event.