Commit Graph
258 Commits
Author SHA1 Message Date
Jonathan White 7f16ea5aa9 Fix warnings with COMPAT signal after Qt6 upgrade
* Fixes a specific warning that spams the console due to a deprecated signal that was used to indicate checkboxes state changed.
* Converted all QCheckBox::stateChanged(int) to QCheckBox::toggled(bool). All functionality still works as intended.
2026-10-21 10:43:26 +02:00
SimonandCopilot Autofix powered by AI 126f508e6a Add list storing key of all custom attributes in database
Add completer when adding/renaming custom attribute

Co-authored-by: Copilot Autofix powered by AI <[email protected]>
2026-09-19 19:26:55 -04:00
IgorandJonathan White 58a2919650 Fix #13073: Respect password generator settings for new entries (#13277)
* Fix #13073: Respect password generator settings for new entries

---------

Co-authored-by: Jonathan White <[email protected]>
2026-07-23 06:42:48 -04:00
ryain11andJonathan White e888fec070 Fix password strength evaluation for referenced passwords (#13479)
* Also fix password strength in entry view

---------

Co-authored-by: Jonathan White <[email protected]>
2026-07-21 12:58:23 -04:00
Jonathan Whiteandvarjolintu aa0cac5c03 Refactor: move to simple default builds (#11003)
* Remove individual feature flags in favor of a single `KPXC_MINIMAL` flag that removes advanced features from the build. Basic features are no longer guarded by feature flags.
* Basic features: Auto-Type, Yubikey, KeeShare
* Advanced features include: Browser (and passkeys), SSH Agent, and Secret Service
* Networking, Documentation, and Update Checking remain as feature flags to accommodate various distro requirements.

This change also cleans up the main CMakeLists.txt by re-arranging some content and placing macros into a dedicated include file. The minimum CMake version was bumped to 3.16.0 to conform to our minimum Ubuntu support of Focal (20.04). This also allows us to default to C++20, we fall back to C++17 for Qt versions less than 5.15.0 due to lack of support.

Lastly this change removes the KEEPASSXC_BUILD_TYPE="PreRelease" which is never used. We only support "Snapshot" and "Release" now.

Additional cleanup of CMakeLists:

1. Removed always-true CMake version guard  if(CMAKE_VERSION >= 3.14.0)

2. Removed dead GCC 4.8 stack protector fallback; C++20 requires GCC 10+, and -fstack-protector-strong has been available since GCC 4.9.

3. Removed dead ASan LSan version guard for the same reason.

4. Converted set_target_properties( COMPILE_DEFINITIONS) to target_compile_definitions() on both keepassxc_core and keepassxc_gui. Both are now PRIVATE since the symbol is an internal build detail.

5. Scoped Qt5Gui_PRIVATE_INCLUDE_DIRS to keepassxc_gui preventing Qt-internal headers from leaking into every target in the build.

6. Use cmake_parse_arguments to cleanup test case definition macros. Remove test output formats as they are never used and can be controlled when tests are run.

* moved /fsanitize=address to compile options instead of definitions for MSVC builds

---------

Co-authored-by: varjolintu <[email protected]>
2026-04-18 22:37:30 -04:00
Alexandre Petit 007839bd90 Fix sshAgent casacading calls with QSignalBlocker 2026-04-16 23:11:35 -04:00
Sami Vänttinenandvarjolintu 2dd56c76cc Fix showing correct checkbox value in entry Browser Integration settings (#12980)
Co-authored-by: varjolintu <[email protected]>
2026-03-08 16:17:27 +01:00
Sami Vänttinenandvarjolintu 6f6076ab81 Fix setting browser related values to customData (#13026)
Co-authored-by: varjolintu <[email protected]>
2026-03-08 12:47:29 +01:00
varjolintu 9dc05a7e52 Fix main URL validation when using placeholders 2026-01-17 19:24:42 -05:00
xboxones1 e591e93d42 Fix minor font and theme issues (#12814)
* Fix font size for all platforms

* Fix font size for TOTP in preview panel

* Styles: drop Windows-specific palette overrides

* Fix encoding of EditEntryWidgetMain.ui

* Fix tab width
2026-01-17 17:39:02 +01:00
Anton Bobov 0732c4bfd4 fix(gui): enable Auto-Type help button when feature is active
The 'openHelpButton' in the Auto-Type configuration widget is now
enabled whenever the main 'Enable Auto-Type for this entry' checkbox is
checked, regardless of whether a custom sequence is defined.

Previously, the help button's state depended on the custom sequence
being enabled, which was inconsistent and confusing. The help is now
available whenever the main Auto-Type feature is enabled, providing
assistance for both default and window-specific sequences.
2026-01-17 14:23:41 +01:00
Edward ArthurandJonathan White 20c7d35216 Add option to auto-generate a password for new entries (#12593)
* Closes #626

---------

Co-authored-by: Jonathan White <[email protected]>
2025-10-26 08:12:26 -04:00
Jonathan White 7ea141652e Update base translations and improve consistency (#12432)
* Improve confirmation prompts and tooltips for delete actions in the GUI

* Fixes #10543
2025-09-07 20:16:36 -04:00
Jonathan White 606cf37952 Prevent mouse wheel scroll on entry edit username field (#12398)
* Reported by shawnkhu via Matrix, thank you!
2025-08-24 09:59:09 -04:00
Alexandre PetitandJonathan White 15ac8ac4f8 Implement function to clear all ssh-agent identities (#10649)
Fixes #8346

---------

Co-authored-by: Jonathan White <[email protected]>
2025-02-01 12:01:22 -05:00
Jonathan White 2738a72b43 Fix assert hit when viewing entry history
* Fixes #11371
* Adds test for showing entry history
* Improved page switching capabilities for entry edit widget
2024-10-27 06:49:10 -04:00
Jonathan White 02881889d5 Fix entry notes reveal button requiring two clicks sometimes 2024-10-14 09:56:17 -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
Alexandre PetitandJonathan White 8cd45f57b7 Fix SSH Agent broken decrypt button (#10638)
* SSH Agent: Fix broken decrypt button (Fixes #10637)

---------

Co-authored-by: Jonathan White <[email protected]>
2024-05-27 14:48:33 -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
qycyfjy 7bfe9065cf Fix removing entry from history and improve logic of history tab showing 2024-01-06 18:23:43 -05:00
Jonathan White 9f3b4dc5ea Fix multiple TOTP issues
* Fix #9847 - don't provide TOTP values if settings are blank or completely wrong
* Fix #6838 - don't reset the ui when creating a new entry and applying TOTP to it
* Move totp source into the core folder
2024-01-06 15:17:13 -05:00
Sami VänttinenandJonathan White 13c88e1013 Passkeys: Add support for importing Passkey to entry (#9987)
---------
Co-authored-by: Jonathan White <[email protected]>
2023-11-22 23:11:25 -05:00
Sami Vänttinenandvarjolintu 139153d9a3 Improve duplicate URL warning (#9635)
Co-authored-by: varjolintu <[email protected]>
2023-08-13 22:18:24 -04:00
Sami Vänttinen 9214ab2038 Add warning for duplicate URLs with Additional URLs list (#9588) 2023-07-15 15:33:05 -04:00
Jonathan White 52775d4a3f Fix various accessibility issues (#9138)
Enable buddy fields in group and entry edit pages
* Fixes #9060, you can now press Alt + [letter] to skip between fields on the group and entry edit pages.
* Move the expire checkbox to the right hand column and use the standard eye icon button for notes reveal. Only show notes reveal button if the hide notes setting is enabled.

Fix overflow of text in default auto-type sequence preview
* Fixes #9083

Add copy title shortcut (Ctrl + I)
* Closes #9109

Fix issues with menu actions being enabled incorrectly

Add accessibility description to password widget to explain how to hide/show passwords and open the generator
* Closes #9059

Add F6 shortcut to focus search
* Closes #9163
2023-04-15 21:35:54 -04: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
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
Hoai-Thu Vuong ef51065c98 Add entry 2 months to preset menu (#8687) 2022-10-28 09:28:00 +02: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
Rosen Penev 7e1d980d08 clang-tidy: use auto
Signed-off-by: Rosen Penev <[email protected]>
2022-05-01 16:02:02 -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
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 9569438295 Always enable Auto-Type help button 2022-03-20 17:49:03 +01:00
Jonathan White 392cab2e36 Remove unused/duplicate icons 2022-03-19 08:23:53 -04:00
Xavier Valls 4a21cee98c Add tags feature
* show the tags in the entry preview
* allow searching by tag
* add a sidebar listing the tags in the database
* filter entries by tag on click
* Introduce a new TagsEdit widget that provides pill aesthetics, fast removal functionality and autocompletion
* add tests for the tags feature
* introduce the "is" tag for searching. Support for weak passwords and expired added.
2022-01-28 16:13:49 -05:00
osx user 15d1b2f0ab Show what changed between entry history items
* Also show what is changed on the current state
* Closes #2621
2021-12-22 05:52:54 -05:00
Aetf a31c5ba006 FdoSecrets: Implement unlock before search
Fixes #6942 and fixes #4443

- Return number of deleted entries
- Fix minor memory leak
- FdoSecrets: make all prompt truly async per spec and update tests
    * the waited signal may already be emitted before calling spy.wait(),
      causing the test to fail. This commit checks the count before waiting.
    * check unlock result after waiting for signal
- FdoSecrets: implement unlockBeforeSearch option
- FdoSecrets: make search always work regardless of entry group searching settings, fixes #6942
- FdoSecrets: cleanup gracefully even if some test failed
- FdoSecrets: make it safe to call prompts concurrently
- FdoSecrets: make sure in unit test we click on the correct dialog

Note on the unit tests: objects are not deleted (due to deleteLater event not handled).
So there may be multiple AccessControlDialog. But only one of
it is visible and is the correctly one to click on.

Before this change, a random one may be clicked on, causing the
completed signal never be sent.
2021-10-16 22:50:04 -04:00
varjolintu b6716bdfe5 Add Browser Integration to Group Edit page
Closes #1789 and closes #3998
2021-10-11 00:19:06 -04:00
Janek Bevendorff 93f0fef1e1 Improve and secure attachment handling (fixes #2400).
Externally opened attachments are now lifecycle-managed properly.

The temporary files are created with stricter permissions and entirely
random names (except for the file extension) to prevent meta data leakage.

When the database is closed, the files are overwritten with random
data and are also more reliably deleted than before.

Changes to the temporary files are monitored and the user is asked
if they want to save the changes back to the database (fixes #3130).

KeePassXC does not keep a lock on any of the temporary files, resolving
long-standing issues with applications such as Adobe Acrobat on Windows
(fixes #5950, fixes #5839).

Internally, attachments are copied less. The EntryAttachmentsWidget
now only references EntryAttachments instead of owning a separate copy
(which used to not be cleared properly under certain circumstances).
2021-08-22 17:09:21 -04:00
osx user 746276edea Enhance last used directory settings
* Use hash based storage for last used directories instead of a key/value for each type
* Explicitly declare certain operations as sensitive and follow the "Remember Last Database" setting for those.
* Introduce database backup directory location (close #6619)
2021-08-22 16:47:42 -04:00
peter 6b14b5dc27 Optimize includes across code base 2021-07-13 22:08:33 -04:00
Aetf 81a66c439c Properly block modified signal during Database destruction (#6438)
fixes #6393
2021-05-27 21:50:15 -04:00
Toni Spets 9b8feed3ed SSH Agent: Use database location to resolve relative key file path
Closes #5225
2021-04-06 23:39:02 -04:00
Jonathan White 80809ace67 Replace all crypto libraries with Botan
Selected the [Botan crypto library](https://github.com/randombit/botan) due to its feature list, maintainer support, availability across all deployment platforms, and ease of use. Also evaluated Crypto++ as a viable candidate, but the additional features of Botan (PKCS#11, TPM, etc) won out.

The random number generator received a backend upgrade. Botan prefers hardware-based RNG's and will provide one if available. This is transparent to KeePassXC and a significant improvement over gcrypt.

Replaced Argon2 library with built-in Botan implementation that supports i, d, and id. This requires Botan 2.11.0 or higher. Also simplified the parameter test across KDF's.

Aligned SymmetricCipher parameters with available modes. All encrypt and decrypt operations are done in-place instead of returning new objects. This allows use of secure vectors in the future with no additional overhead.

Took this opportunity to decouple KeeShare from SSH Agent. Removed leftover code from OpenSSHKey and consolidated the SSH Agent code into the same directory. Removed bcrypt and blowfish inserts since they are provided by Botan.

Additionally simplified KeeShare settings interface by removing raw certificate byte data from the user interface. KeeShare will be further refactored in a future PR.

NOTE: This PR breaks backwards compatibility with KeeShare certificates due to different RSA key storage with Botan. As a result, new "own" certificates will need to be generated and trust re-established.

Removed YKChallengeResponseKeyCLI in favor of just using the original implementation with signal/slots.

Removed TestRandom stub since it was just faking random numbers and not actually using the backend. TestRandomGenerator now uses the actual RNG.

Greatly simplified Secret Service plugin's use of crypto functions with Botan.
2021-04-05 22:56:03 -04:00
Ojas Anand 022154462e Add entry view column for password strength
* Closes #4216

Reduced to three-tiered rating system and fixed column implementation. Hide password strength indicator in entry view if excluded from reports.

Introduce password health caching to prevent unnecessary calculations.
2021-02-26 22:10:04 -05:00
Jonathan White 027ff9f2bf Overhaul Auto-Type Action Handling
* Close #2603 - Add support for modifier syntax (+, ^, and %)
* Fix #2633 - Allow reference syntax {REF:...} in Auto-Type sequences
* Close #5334  - Tell the user which part of the Auto-Type sequence is invalid for easy correction
* Fix #2401 - Select the right window on macOS prior to starting Auto-Type

* Allow for nested placeholders
2021-02-21 16:33:54 -05:00
Janek Bevendorff 3b30855855 Fix code formatting 2021-01-12 18:27:00 -05:00
Janek Bevendorff 86278311d2 Merge branch 'master' into develop 2021-01-12 18:24:59 +01:00