Commit Graph

4346 Commits

Author SHA1 Message Date
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
Michal Lukaszek
56a1b465a1 Add support for Microsoft Edge 2022-01-08 17:17:50 -05:00
varjolintu
7efaca6fbe Accept kdbx:// urls in Edit Entry view 2021-12-30 08:14:30 -05:00
Sami Vänttinen
cd642e7fee
Add support for Browser statistics (#7197)
Co-authored-by: Jonathan White <support@dmapps.us>
2021-12-30 07:31:06 -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
Jonathan White
12990e59ad KeeShare: Remove checking signed container
* Remove QuaZip dependency in favor of minizip
* Remove signature checks, but maintain signatures for backwards compatibility
* Remove UI components related to certificates except for personal certificate for backwards compatibility
* Default to unsigned containers (*.kdbx)
2021-12-14 23:23:23 -05:00
Lorenzo Tucci
c88d8c870f Add lock selected database action on toolbar
Closes #6445

Switch tab when locking a database and move Lock Database actions to the Database section of the toolbar.
2021-12-12 23:40:59 -05:00
Daniel Peshev
456726556d Add url field to download favicon 2021-12-12 12:32:11 -05:00
varjolintu
12d16f67ae Download favicon in the background after credential add 2021-12-12 08:14:14 -05:00
Geert Ijewski
d16fc2d62a Add db statistic output to CLI db-info command.
Closes #6920
2021-12-08 23:41:05 -05:00
mckeema
6c4a82bd51 Make selected text copyable instead of copying password
* Fixes 7209
2021-12-08 19:39:51 -05:00
Patrick Klein
a0a063b57f
Add -i/--include option to "generate" CLI command. (#7112) 2021-12-07 23:40:09 -05:00
evgfilim1
b3896f2600 Add simple detection of timestamp resolution
Set access time equal to modification time
2021-12-03 12:07:18 -05:00
Xavier Valls
d8c62f8eba
bump to the C++17 standard in the build system (#7180) 2021-11-29 10:57:59 +01:00
Toni Spets
606096278b Auto-Type: Remember previous selected global match
This makes using multi-stage login forms slightly easier as you
can avoid typing the search terms multiple times.
2021-11-26 10:31:20 -05:00
Jonathan White
d3d7bd7b81 Fix transient save errors in TestGui 2021-11-25 14:29:13 -05:00
Toni Spets
2fb1c076d4 SSH Agent: Show correct error messages in main window
Fixes #7152
2021-11-24 22:37:28 -05:00
tenzap
dc7ad6c1b7
Fix syntax issue & add a missing header (#7160)
* Fix syntax to prevent compilation issue

Fix build failure with AppleClang 7 & 8.

Error was:
src/core/CustomData.cpp:30:41: error: default initialization of an object of const type 'const CustomData::CustomDataItem' without a user-provided default constructor
static const CustomData::CustomDataItem NULL_ITEM;
                                        ^
                                                 {}
src/core/Metadata.cpp:32:39: error: default initialization of an object of const type 'const Metadata::CustomIconData' without a user-provided default constructor
static const Metadata::CustomIconData NULL_ICON;
                                      ^

src/core/Metadata.cpp:32:48: note: add an explicit initializer to initialize 'NULL_ICON'
static const Metadata::CustomIconData NULL_ICON;
                                               ^
                                               {}

* Add missing QUuid header

Fixes this compilation issue with LLVM clang 9, possibly also due to an old QT5

tests/TestTools.cpp:96:39: error: incomplete type 'QUuid' named in nested name specifier
    auto validUuid = Tools::uuidToHex(QUuid::createUuid());
                                      ^~~~~~~
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qmetatype.h:1887:1: note: forward declaration of 'QUuid'
QT_FOR_EACH_STATIC_CORE_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qmetatype.h:108:18: note: expanded from macro 'QT_FOR_EACH_STATIC_CORE_CLASS'
    F(QUuid, 30, QUuid) \
                 ^
tests/TestTools.cpp:101:40: error: incomplete type 'QUuid' named in nested name specifier
    auto nonHexUuid = Tools::uuidToHex(QUuid::createUuid()).replace(0, 1, 'p');
                                       ^~~~~~~
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qmetatype.h:1887:1: note: forward declaration of 'QUuid'
QT_FOR_EACH_STATIC_CORE_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER)
^
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qmetatype.h:108:18: note: expanded from macro 'QT_FOR_EACH_STATIC_CORE_CLASS'
    F(QUuid, 30, QUuid) \
                 ^
2021-11-24 22:36:31 -05:00
tenzap
61e378077e
Fix compilation on macOS when clang < 9 or Qt < 5.12 (#7117)
* fix compilation on Qt not having QOperatingSystemVersion::MacOSBigSur

The code uses 'QOperatingSystemVersion::MacOSBigSur' which doesn't exist
in all Qt versions (it has been backported to Qt 5.12.10+ & 5.15.1+ only).
On older macos systems like El Capitan the last supported
version of Qt is 5.11

This will fix compilation issue on such older systems and on systems
running with Qt not supporting QOperatingSystemVersion::MacOSBigSur

Compilation error was:
error: no member named 'MacOSBigSur' in 'QOperatingSystemVersion'

* Fix compilation when osx <= 10.9

* AppKitImpl.mm: button property is new in 10.10. It is used for a feature of
  KeePassXC that is only available from 10.17 onwards. So we don't need it when
  compiling on <= 10.9
error: property 'button' not found on object of type 'NSStatusItem *'
        NSString* appearance = [dummy.button.effectiveAppearance.name lowercaseString];
                                      ^

* The code uses @available syntax which is supported by
  AppleClang >= 9 or LLVM >= 5.
  We check __clang_major__ to allow compilation on older versions
  of macOS that don't have a recent clang. For example on El Capitan.

* Fix compilation when osx <= 10.8

* AppKitImpl.mm: AXIsProcessTrustedWithOptions exists from 10.9 onwards
error: use of undeclared identifier 'kAXTrustedCheckOptionPrompt'
error: use of undeclared identifier 'AXIsProcessTrustedWithOptions'

* Fix compilation when osx <= 10.7

* MacUtils.cpp: CoreGraphics exists from 10.8 onwards only, capslock detection
  feature would have to be implemented on OSX <= 10.7

* AppKitImpl.mm: CGDisplayStreamRef exists from 10.8 onwards only. It is used for a
  feature of KeePassXC that is only available from 10.15 onwards. So we don't need it
  when compiling on <= 10.7
error: unknown type name 'CGDisplayStreamRef'

* AppKitImpl.mm: Syntax is not understood by 10.7, update it to be understandable
  by <= 10.7
error: expected method to read dictionary element not found on object of type 'NSDictionary *'
    NSRunningApplication* app = userInfo[NSWorkspaceApplicationKey];
                                ^

* The code uses @available syntax which is supported by
  AppleClang >= 9 or LLVM >= 5.
  We check __clang_major__ to allow compilation on older versions
  of macOS that don't have a recent clang.

* Fix compilation error on OS X 10.11

src/core/Alloc.cpp:44:10: error: no type named 'free' in namespace 'std'
    std::free(ptr);
    ~~~~~^

This is a regression, since it was fixed in [1]

Per [2], std::free() needs #include <cstdlib>. That file is included
indirectly on newer systems.

[1] 7c6c027d33
[2] https://en.cppreference.com/w/cpp/memory/c/free

* fix compilation when macos SDK <= 10.14

These methods are only available from macOS 10.15
  - kSecAccessControlWatch
  - LAPolicy.deviceOwnerAuthenticationWithBiometricsOrWatch

The code uses @available syntax which is supported by
AppleClang >= 9 or LLVM >= 5.
We check __clang_major__ to allow compilation on older versions
of macOS that don't have a recent clang.
2021-11-24 22:35:38 -05:00
Patrick Sean Klein
296cbf0df7 Add sorting of HTML export
- Closes #6164
- Implement sorting support in HtmlExporter
- Add ExportDialog class and UI, which allows to configure export options.
2021-11-24 00:12:13 -05:00
tenzap
d3b28f8651
use cmake's FindOpenMP (#7156)
check_add_gcc_compiler_flag("-fopenmp")
is not robust enough. On some systems and with some compilers
(eg. AppleClang 7) it may say the compiler flag is valid, but later build
fails with:

ld: library not found for -lgomp

Actually, AppleClang doesn't support OpenMP

Replace this check with cmake's FindOpenMP [1] which gives better results.

Output example in case of not found
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)

Output example in case of found
-- Found OpenMP_C: -fopenmp=libomp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp=libomp (found version "3.1")
-- Found OpenMP: TRUE (found version "3.1")

[1] https://cmake.org/cmake/help/v3.3/module/FindOpenMP.html?highlight=openmp#variables
2021-11-23 13:34:35 +01:00
Janek Bevendorff
a3dc977e58 Correctly set KDBX envelope version
Shows a warning when trying to open with a newer minor version than what is currently supported.

We always try to save with the lowest KDBX version possible for maximum compatibility.
2021-11-22 12:58:04 +01:00
Janek Bevendorff
67603ab42e Retain number of rounds when auto-upgrading KDBX version 2021-11-22 12:58:04 +01:00
Janek Bevendorff
c94efe6b5c Avoid redundant KDBX4 test runs 2021-11-22 12:58:04 +01:00
Janek Bevendorff
c872e406ed Upgrade to KDBX 4 if new 4.1 features are used 2021-11-22 12:58:04 +01:00
Janek Bevendorff
835e31ac3c Implement KDBX 4.1 CustomData modification date
We keep the old merging behaviour for now, since deleting a
CustomData entry does not create DeletedObject.
2021-11-22 12:58:04 +01:00
Janek Bevendorff
390e14b2c6 Implement KDBX 4.1 extended custom icons 2021-11-22 12:58:04 +01:00
Janek Bevendorff
70e62d90db Add "Restore Entries" feature 2021-11-22 12:58:04 +01:00
Janek Bevendorff
e5822974ac Implement KDBX 4.1 group tags 2021-11-22 12:58:04 +01:00
Janek Bevendorff
cd9ef58e98 Implement KDBX 4.1 PreviousParentGroup flag 2021-11-22 12:58:04 +01:00
Janek Bevendorff
ffaeac130f Implement KDBX 4.1 PasswordQuality flag 2021-11-22 12:58:04 +01:00
Jonathan White
035757e228
Improve Visual Studio and vcpkg support 2021-11-16 07:01:48 -05:00
ADD-SP
e5065a01c8 Fix crash while downloading favicons 2021-11-13 23:18:47 -05:00
Jonathan White
c37e2d3d69 Fix entry preview resetting when focusing out of entry view
* Fixes #7061
* This bug impacts linux only when clicking in the preview panel.
2021-11-13 23:17:30 -05:00
louib
004f2b6801 Removing QWidget dependency from src/core. 2021-11-12 07:41:30 -05:00
Jonathan White
6f5bbf7ad1
Fix database save calls in CLI due to backup path 2021-11-07 17:52:23 -05:00
Patrick Klein
84ff6a13f9
Allow specifing database backup paths. (#7035)
- Default backupFilePath is '{DB_FILENAME}.old.kdbx' to conform to existing standards
- Implement backupPathPattern tests.
- Show tooltip on how to format database backup location text field.
2021-11-07 17:41:17 -05:00
Jonathan White
8d7e491810 CLI: Fixed typo in tests 2021-11-07 17:27:16 -05:00
Andre Blanke
7d37f65ad0 CLI: Add commands to handle attachments
* Add commands to manipulate entry attachments from the CLI
* Closes #4462

* Add the following commands:
  attachment-export: Exports the content of an attachment to a specified file.

  attachment-import: Imports the attachment into an entry. An existing attachment with the same name may be overwritten if the -f option is specified.

  attachment-rm: Removes the named attachment from an entry.

* Add --show-attachments  to the show command
2021-11-07 17:27:16 -05:00
snipfoo
7811f10dba
Support for wordlists in user configuration directory (#6799)
This commit allows users to put alternative wordlists in a `wordlists` subdirectory below their KeePassXC directory (e.g., under Linux, `~/.config/keepassxc/wordlists`). These wordlists will then appear in the dropdown menu in the *Password Generator* widget.

In order to differentiate between lists shipped with KeePassXC and user-provided lists, the former appears with a (SYSTEM) prefix.
2021-11-04 23:02:33 -04:00
Sami Vänttinen
bb88ad6e8c
Add Microsoft Edge support for Linux (#7100) 2021-11-04 23:02:02 -04:00
Toni Spets
3b1acd0831
Auto-Type: Reimplement X11 keysym emulation (#7098)
* Fix Regression since 4d07507

* Auto-Type: Workaround X server default keymap bug

If there's a system wide configuration through xorg.conf for a default keyboard layout and it's not updated by the WM/DE at startup the Xkb extension seems to be somewhat confused with XTEST and the layout somehow defaults to US ANSI.

Reading the keyboard description and writing it back without changes works around this.
2021-11-04 23:01:47 -04:00
Patrick Sean Klein
20db504c3a Implement "Overwrite attachment" confirmation dialog. 2021-10-24 23:41:57 -04:00
Sami Vänttinen
55f2bd41aa
Modify the KeePassHTTP attribute conversion button text (#7073) 2021-10-24 22:34:30 -04:00
varjolintu
dd41f093e6 Launch KeePassXC password generator popup from the extension
* Closes #6473
2021-10-24 10:24:17 -04:00
Aetf
2a9d92faeb
FdoSecrets: reject setting refs via the API (#7043)
* FdoSecrets: add TOTP as a readonly attribute

* FdoSecrets: reject setting fields containing refs, fixes #6802

It is still possible to set refs using KPXC UI.
2021-10-24 10:22:50 -04:00
Patrick Sean Klein
c8f135aaed Resolve references of entry attributes when exporting to HTML. 2021-10-24 10:21:35 -04:00
Andreas Schneider
9fc30265c8 cmake: Check for PIE support 2021-10-24 10:20:59 -04:00
Jonathan White
9aa30c4e72
Fix building on macOS due to PCSC
* Fixes #7072
2021-10-23 17:07:29 -04:00
Andreas Schneider
3ecc0c70e2 cmake: Fix position independent code with LTO
Fixes #7044
2021-10-16 22:52:10 -04:00