4957 Commits

Author SHA1 Message Date
Blessio bbc28b931b Fix: Windows SDK path resolution without CMAKE implicit link directories
This commit enhances the CMake configuration for Windows builds by
providing more robust path resolution for the Windows SDK.
2026-06-04 13:11:13 -04:00
John Lawniczak 81f34ff978 Fix KeePass1 group time field validation 2026-06-04 13:10:52 -04:00
varjolintu 608967954c Fix KPH mention in browser documents 2026-06-03 06:16:52 -04:00
Jess Sullivan b9bcbfc592 Fix: address #12631 2026-05-27 15:58:15 -04:00
Caesar Woo 80c2ad7a0d Fix flatpak builds (#13382) 2026-05-27 15:56:20 -04:00
Michał Kępień 02784b0eee Fix race in dark mode detection (#13366)
The current dark mode detection implementation is prone to a race
between an asynchronous D-Bus method call in NixUtils::NixUtils() and
bootstrap logic in Bootstrap::bootstrap().  This race condition causes
dark mode detection to fail intermittently during application startup.

The sequence of events in the failing case is as follows:

 1. In the Application constructor, osUtils is instantiated, causing
    the NixUtils constructor to run.

 2. An asynchronous D-Bus method call is issued to query the value of
    the org.freedesktop.appearance.color-scheme key.

 3. Bootstrap code runs.  In particular, a prctl() system call is
    issued to set the keepassxc process "dumpable" attribute to 0.

 4. xdg-desktop-portal begins handling the D-Bus method call initiated
    in step 2.  Flatpak detection logic is invoked, triggering an
    attempt to access /proc/<pid>/root, where <pid> is the PID of the
    keepassxc process.

 5. Since the keepassxc process had its "dumpable" attribute set to 0
    in step 3, its /proc/<pid>/root entry becomes owned by root.  This
    causes the access attempt from xdg-desktop-portal to fail, which in
    turn causes the D-Bus method call to fail as well.  As a result, the
    registered callback (NixUtils::handleColorSchemeRead()) is never
    invoked, effectively breaking dark mode detection.

If xdg-desktop-portal completes its permission checks before the
prctl() system call is issued (that is, if the order of steps 3 and 4
is reversed), everything works correctly.

Fix by replacing the asynchronous D-Bus method call with a synchronous
one, preventing bootstrap code from executing while the D-Bus call is
still pending.

* Use ReadOne D-Bus method instead of Read

The org.freedesktop.portal.Settings.Read method is deprecated.  Replace
its use with org.freedesktop.portal.Settings.ReadOne and adjust reply
handling accordingly.

Remove NixUtils::handleColorSchemeRead(), which is no longer needed.
2026-05-23 18:53:09 -04:00
Jonathan White 36fbca49f7 Fix running windeployqt for Qt6 (#13356)
---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: droidmonkey <2809491+droidmonkey@users.noreply.github.com>
2026-05-23 10:37:43 -05:00
Max 86fec5c049 changed minimum number of threads in the QThreadPool from 2 to 3 2026-05-20 09:36:36 -05:00
Jonathan White bbd4423a30 Fix saving SSH Agent settings
* Fixes #13351
* This unfortunately breaks backwards compatibility with the _original_ KeeAgent plugin for KeePass2. Qt6 refuses to write XML in UTF-16 format, so we have to use UTF-8. This should not be a big deal at all since our SSH agent integration has surpassed the original KeeAgent with features at this point.
2026-05-18 16:51:44 -04:00
Jonathan White 0d69edd88d Fix typo in Windows clipboard exclusion 2026-05-17 16:04:39 -04:00
Sami Vänttinen 7c7ca4575e WIP: Qt6 transition (#11651)
Update KeePassXC to use Qt 6.
2026-05-04 15:16:51 +03:00
varjolintu 703855bec3 Fix CMakeFiles for BSDs 2026-04-25 10:13:45 -04:00
Adrien Ollier 89e4b146bc fix(BOTAN3): compilation failed due to a bad definition 2026-04-25 07:48:36 -04:00
Jonathan White 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 <sami.vanttinen@ahmala.org>
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
Adrien Ollier 8ab21631cb Refactor: avoid naming lambda expressions and use STL algorithm (#13231)
* Refactor: avoid naming lambda expressions and use STL algorithm

Lambda expressions in C++ are designed to be anonymous, lightweight, and local,
intended to encapsulate concise logic without the need for formal declarations.
Explicitly naming them (e.g., assigning to a variable or using a named `auto`)
contradicts their purpose: it introduces redundancy, adds unnecessary weight,
and blurs the line between lambdas and regular functions.

This change removes unnecessary lambda names and replaces the custom logic with
a standard STL algorithm, making the code more idiomatic, maintainable, and
aligned with the STL's philosophy of generic, reusable components.

* Refactor: Use std::any_of and lambda for deleted object checks

Replace manual for-loop iteration with std::any_of and a lambda expression
to check for the presence of a deleted object by UUID. This improves code
clarity, conciseness, and aligns with modern C++ best practices by leveraging
STL algorithms and functional-style expressions.

The second overload of containsDeletedObject() is now implemented by reusing
the first, avoiding code duplication and ensuring consistency.

* Run code format

* refactor(config): replace manual loop with `std::any_of` for roaming settings validation

- Remove the local lambda function `isValidSetting` and replace it with a direct use of `std::any_of` in the loop.
- Improve code readability and maintainability by leveraging the C++ Standard Library.
- Reduce redundancy and make the logic more concise and idiomatic.

This change ensures the code is more aligned with modern C++ practices while maintaining the same functionality.

* refactor(icons): simplify image format validation using `std::all_of`

- Replace manual loop and flag-based validation with `std::all_of` to check for non-alphanumeric characters in image formats.
- Improve code clarity and reduce boilerplate by leveraging the C++ Standard Library.
- Maintain the same filtering logic while making the code more concise and idiomatic.

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2026-04-16 17:13:41 -04:00
Roman Mateea 4fbdf0c498 Fixed uninitialized variable m_mode in SymmetricCipher.h (#13173) 2026-04-16 10:09:16 -04:00
Adrien Ollier 9154f7a881 Refactor: Remove unused variables and member (#13230)
Use const exceptions
2026-04-16 08:27:28 -04:00
Matt Ezell da8f7cdceb Fix ghost window on Windows by using proper dialog window flags (#13201)
* Fix ghost window on Windows by using proper dialog window flags

Replace Qt::Window with Qt::Dialog | Qt::WindowTitleHint | Qt::WindowCloseButtonHint
in UpdateCheckDialog to prevent an orphaned DWM window frame on Windows 11.

Using bare Qt::Window on a QDialog causes Windows DWM to create an independently
managed top-level composition surface. If the dialog's native handle is not
cleanly destroyed (e.g., during process exit while the dialog exists), DWM can
leave behind a transparent, non-interactive ghost window frame that persists
even after the process is gone and can only be cleared by rebooting.

Using Qt::Dialog keeps the dialog properly associated with its parent window
in DWM's composition tree, preventing the orphaned frame.

Fixes #9493
2026-04-16 08:27:07 -04:00
Zebra2711 e67cd937a5 fix build with botan 3.11 (#13161)
---------

Co-authored-by: Jonathan White <support@dmapps.us>
2026-04-16 08:26:09 -04:00
JCira-OSU 6d5ab28527 Fix health check reused password count tooltip 2026-04-14 07:19:32 -04:00
TCruz 48a4ebc29c Fix #12372: Replace 'populate' with 'fill' in Browser Integration docs 2026-04-14 07:19:11 -04:00
Y.D.X. 52318f4d22 Fix a broken in-page link in the documentation 2026-04-13 19:45:52 -04:00
Jonathan White ad4a807e70 Fix the TOTP Gui test for Ubuntu Jammy
* For some reason the C locale setting is not respected in Jammy and the test fails due to attribute sorting
2026-04-13 06:04:12 -04:00
Jonathan White 379be00127 Add more entry types for Proton Pass importer
* Fixes #13130

* Add wifi and sshKey import types
* Add catch-all import type to prevent loss of data when Proton Pass introduces new things
2026-03-15 06:06:19 -04:00
Jonathan White 38a1119807 Prevent hiding menubar on macOS
* Fixes #10706
2026-03-14 19:22:54 -04:00
yjdyamv 40c79f58f0 Rename Chinese language options for clarity and better sorting. (#13129)
Replace "Chinese (China)" with "Chinese (Simplified)" and "Chinese (Taiwan)" with "Chinese (Traditional)". This keeps both items adjacent in the language dropdown, uses script-accurate naming, and avoids any geographic misinterpretation.
2026-03-14 07:48:43 -04:00
Janek Bevendorff d5f7614e06 Create output dir if it does not exist and revert previous patch
This reverts commit 36a26308d0.
2026-03-12 23:34:04 +01:00
Janek Bevendorff 36a26308d0 Fix indentation error in BuildSrc 2026-03-10 02:35:42 +01:00
Janek Bevendorff 5b5ab5334a Update changelog 2026-03-10 02:35:42 +01:00
Janek Bevendorff 12ef38c192 Also override OPENSSL_ENGINES to prevent DLL injection (#13124) 2026-03-10 00:38:06 +01:00
Jonathan White b7ad8b4761 Security: Prevent loading of openssl.cnf (#13118)
* Security: Prevent loading of openssl.cnf

Prevent loading openssl.cnf from the originating vcpkg folder tree to avoid DLL injections. This patch force sets the OPENSSL_CONF and OPENSSL_MODULES env vars to an invalid directory. This prevents openssl from attempting to load a cnf file which can contain settings to load arbitrary DLL files into KeePassXC memory space.

Thank you to zdi-disclosures for reporting this finding!
2026-03-09 23:42:25 +01:00
Sami Vänttinen d9be1b0682 Passkeys: Fix default BE and BS flag value (#13122) 2026-03-09 17:44:10 +01:00
Jonathan White 56521023b8 Support TIMEOTP autotype and entry placeholder (#13117)
* Additional fix for #7263 to support KeePass2 placeholder for TOTP

---------

Co-authored-by: Janek Bevendorff <janek@keepassxc.org>
2026-03-08 23:17:36 -04:00
Jonathan White fd10c9dea1 Revert uiaccess=true due to runtime issues
After building KeePassXC, it is impossible to run the program successfully from a user-writable location. This will prevent us from releasing the portable version.
2026-03-08 20:07:26 -04:00
Janek Bevendorff 5c91c9986a Mock datetime to avoid test failures on second lapse (#13115)
Fixes #13059
2026-03-08 22:26:10 +01:00
Janek Bevendorff cc309ff813 Sanitise attachment file names before saving (#13114)
Reported by @yuki-matsuhashi
2026-03-08 17:50:48 +01:00
Sami Vänttinen a1cddad37c Add support for nested folders with Bitwarden import (#13081)
Co-authored-by: varjolintu <sami.vanttinen@ahmala.org>
2026-03-08 16:18:22 +01:00
Sami Vänttinen 2dd56c76cc Fix showing correct checkbox value in entry Browser Integration settings (#12980)
Co-authored-by: varjolintu <sami.vanttinen@ahmala.org>
2026-03-08 16:17:27 +01:00
virgoparna b45cea0d9c Add uiAccess=true manifest to fix Auto-Type into elevated prompts (#13070)
Add uiAccess=true manifest (#13070)

Fixes #12956 (KeepassXC cannot autotype into windows password prompts)
2026-03-08 13:36:48 +01:00
Sami Vänttinen 1ce2ce9bb8 Passkeys: Set BE and BS flags to true (#13042)
Passkeys: Set BE flag to true

---------

Co-authored-by: varjolintu <sami.vanttinen@ahmala.org>
2026-03-08 13:08:15 +01:00
Sami Vänttinen 6f6076ab81 Fix setting browser related values to customData (#13026)
Co-authored-by: varjolintu <sami.vanttinen@ahmala.org>
2026-03-08 12:47:29 +01:00
Jonathan White ec034eaf7d Revert Auto-Type change that caused race condition (#12738)
* Fixes #12723
2026-03-08 11:58:52 +01:00
Janek Bevendorff ada379fddd Fix Linux test failures (#13113)
* Fix test failure introduced by ab31a748fa (#10993)

* Fix tray hiding test failure

Introduced by 43904d87b7 (#10928), but somehow hasn't posed an issue until now.

* Try to make attachment GUI test more robust

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2026-03-06 17:59:02 -05:00
Janek Bevendorff 58aee6f239 Advance vcpkg baseline 2026-02-15 23:45:37 -05:00
Janek Bevendorff 5bd42c4725 Check version in vcpkg.json and appstream XML well-formedness, add translator listing (#12968)
* Check version in vcpkg.json and appstream XML well-formedness

* Move translator list utility to release-tool
2026-01-18 16:45: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
varjolintu b370aed3e7 Fix showing URls in browser access dialog 2026-01-17 14:27:58 +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