Commit Graph

4555 Commits

Author SHA1 Message Date
Carlo Teubner
bb4f5c2e94 Run tests with LANG=en_US.UTF-8
On my system, I have LANG=en_GB set, which causes the following test
failure:

    FAIL!  : TestCli::testInfo() Compared values are not the same
       Actual   (m_stdout->readLine())                                  : "Average password length: 11 character(s)\n"
       Expected (QByteArray("Average password length: 11 characters\n")): "Average password length: 11 characters\n"
       Loc: [tests/TestCli.cpp(876)]

And it so happens that the en_GB translation of that string has
'character(s)' where en_US has 'characters'.
2022-10-02 08:30:35 -04:00
Jonathan White
eaa363d8c0
Fix crash when deleting items in recycle bin while searching (#8117)
* Fix #8099
* Clean up code that connects groups to the entry view. Instead of connecting ALL groups from ALL databases, we only need to connect the groups that entries actually belong to. This solves the bug and also reduces overhead.
2022-09-22 08:40:23 -04:00
Nikolas Grottendieck
d181f80c8c Set new default location hints for Qt on macOS
QT5 as offered by Homebrew is versioned since March 2021 and the default
path points to QT6 (if installed). New installations of qt5 have a
suffixed path (qt@5) that should be used instead.
2022-09-11 22:33:23 -04:00
Jim Heden
33d8b6db62 Add shortcut to copy password with TOTP appended 2022-09-11 11:37:27 -04:00
Damian Rhodes
59e2c38635
Point INSTALL.md checkout reference to latest tag (#8225) 2022-09-11 08:38:53 -04:00
mckeema
dd15db721a Set correct case for database file path on Windows
* Fix #7139 - when opening database files from the command line, ensure the correct case is fed to the program to prevent case changes during saves.
* Cleanup old code (checking for .json extension) from when KeePassXC app could act as a proxy.
2022-09-10 13:35:54 -04:00
varjolintu
ef6d8f1138 Browser: Asynchronous Access Confirm dialog 2022-09-10 13:18:30 -04:00
andreas-ementio
612c1098ea Fix CLI output when using clip with the -t flag
if you use the CLI with -t/--totp flag, the program prints out: "Entry's "password" attribute copied to the clipboard!"
expected output is "Entry's "totp" attribute copied to the clipboard!" the same when you run with -a totp
2022-09-08 06:48:18 -04:00
varjolintu
ed7b634dbf Do not allow expired credentials automatically 2022-09-08 06:48:05 -04:00
Jonathan White
4c1e5ec74c Support numeric aware sorting on Windows and macOS
* Fix #8356 - Qt does not enable numeric aware sorting when using locale sort. Extracted both Windows and macOS locale aware sorting code and added the appropriate numeric aware flag.

Note: There is no std library way to do this so Linux is out of luck for now.
2022-09-08 06:47:14 -04:00
Jonathan White
b0a68ea0de Improve various application icons 2022-09-08 06:46:48 -04:00
Jonathan White
f32dc96757 Show entry count in status bar
Closes #3963
2022-09-08 06:46:48 -04:00
Jonathan White
79ac8b3c95 Fix tabbing around database widget
Fixes #8352
2022-09-08 06:46:48 -04:00
Jonathan White
e5bd5f39fb Use search for showing expired entries on unlock
* Fix #8036 - use search interface to display expiring entries on first unlock.
2022-09-08 06:46:48 -04:00
Jonathan White
dfee59742f Enhance Tags / Saved Searches
* Rename "Database Tags" to "Searches and Tags"
* Separate searching for all entries and resetting the search
* Support selecting multiple tags to search against
* Fix using escaped quotes in search terms
* Make tag searching more precise
* Support `is:expired-#` to search for entries expiring within # days. Exclude recycled entries from expired search.
* Don't list tags from entries that are recycled
* Force hide tag auto-completion menu when tag editing widget is hidden. On rare occasions the focus out signal is not called when the tag view is hidden (entry edit is closed), this resolves that problem.
* Remove spaces from before and after tags to prevent seemingly duplicate tags from being created.
* Also fix some awkward signal/slot dances that were setup over time with the entry view and preview widget.

Allow changing tags for multiple entries through context menu

* Closes #8277 - show context menu with currently available tags in database and checks those that are set on one or more selected entries. When a tag is selected it is either set or unset on all entries depending on its checked state.

* Add ability to save searches and recall them from the "Searches and Tags" view
* Add ability to remove a tag from all entries from the "Searches and Tags" view
* Cleanup tag handling and widgets
2022-09-08 06:46:48 -04:00
Jonathan White
61f922179b Check for write permission before entering portable mode
* Fix #7585
2022-09-07 07:06:23 -04:00
Jonathan White
9e81c31e5a Fix OPVault import when there are multiple OTP fields
* Fix #8371 - store multiple OTP fields as `otp_#` instead of silently discarding them.
2022-09-07 06:48:21 -04:00
Yaroslav Isakov
bdeef63fe4 Allow KeePassXC to be built without X11 2022-09-05 13:52:52 -04:00
Jonathan White
ed693e146d Fix Windows Hello bugs
* Fix #7977 - wrap key signing request in try/catch block to prevent crashes on some machines.
* Fix #8120 - try 3 times to bring Windows Hello prompt to front. This may be necessary on older machines that are slow to bring up the prompt window.

Also remove defunct code on macOS to prevent window focus issues.
2022-09-05 12:24:58 -04:00
Klemens Nanni
14f12b0a25 autostart: Linux: Exec= filename not absolute path
Systems like NixOS install software under unique paths, so persisting
the absolute file path in the generated .desktop file when enabling
autostart will eventually point at an outdated or nonexistent program.

Another possible issue with using Qt's `applicationFilePath()` is that
the final program's basename (`argv[0]`) might not be the same as what
the user initially executed to start KeePassXC.

Use the file name and thus rely on `PATH` lookup just like the static
.desktop file does to lift those issues and defer execution logic
(`PATH` lookup, wrapper scripts, etc.) to the operating system.
2022-09-05 12:23:50 -04:00
Christoph Honal
e05f6a4c5b Hardware keys: Add VivoKey and DT token ATRs
This adds the ATRs of the VivoKey Apex and the
Dangerous Things FlexSecure tokens, in order to
display a human-readable name instead of "Unknown Key".
2022-09-05 11:24:58 -04:00
Dennis
bd809ba90b
TouchID support refactoring (#8311)
Fixes #7695 - Properly set compile flags based on availability of watch unlock in the API.
2022-09-05 10:38:02 -04:00
louib
15b9e82f93
[CLI] Add Option to show all attributes (Show command) (#8256)
* Adding --all option to Show
2022-08-20 22:38:58 -04:00
louib
aa839e2619 Adding top-level fields to CLI commands
The top-level fields are currently not accessible from the CLI, which
makes it impossible to select entries or groups based on the UUID.
There are other top-level fields I believe, like the expiry date,
but I only added the two most critical fields for the moment.
2022-08-20 18:31:30 -04:00
Jonathan White
a6d3f973fa Better handling of "Lock on Minimize" setting
* Fix #1090 - delay locking databases after minimize to allow for clipboard use, Auto-Type use, and browser integration use.

* Fix #6757 - prevent setting both minimize on unlock and lock on minimize settings at the same time.
2022-08-01 18:19:45 -04:00
Jonathan White
dab6d9408e Add setting for number of recent files
* Expose setting to limit the number of recent files. Default is still 5, can be set from 1 to 25.
* Also fix tab order on settings page
2022-07-11 06:55:03 -04:00
Daniel Ziegenberg
6b05b84895 Add Ctrl+Tab shortcut to cycle databases in unlock dialog
The main window has both `Ctrl+PageUp` / `Ctrl+PageDown` and
`Ctrl+Tab / Ctrl+Shift+Tab` shortcuts to cycle the database tabs. When
in PR #5427 the abbility to select any open database in the unlock
dialog was introduced, only the `Ctrl+PageUp` / `Ctrl+PageDown`
shortcuts were added. This commit adds the `Ctrl+Tab / Ctrl+Shift+Tab`
shortcuts to the unlock diaglog to fix this inconsistent UI behaviour.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-07-01 22:29:33 -04:00
Bernhard Kirchen
861fe2e5a9 cmake: make libxi and libxtst a requirement with autotype enabled 2022-06-19 10:34:52 -04:00
Bernhard Kirchen
63a5e474a6 cmake: emit warning if X11_Xi or X11_XTest not found
at least on Debian, a bullseye installation, the X11 development files
may be installed without the libxi-dev or the libxtest-dev packages.
this leads to the autotype shared library libkeepassxc-autotype-xcb.so
not being built without any complaint from cmake.

this commit makes cmake emit warning messages that shall hint anyone
building themselves that autotype will not work without these libs.
2022-06-19 10:34:52 -04:00
Jonathan White
b86c3e64ec Fix crash when trying to close database during unlock
* Fix #7239 - prevent closing the database widget if the open dialog is still unlocking the database. This problem became slightly worse with quick unlock.

With this fix, if the user tries to close the database during unlock we will just ignore that request.
2022-06-14 05:58:38 -04:00
varjolintu
6cb6f1f007 Browser: Add a new group setting for omitting WWW subdomain when matching URLs 2022-06-12 16:45:54 -04:00
JakobDev
a2aac7066c Add vcs-browser and contribute URLs to Appdata 2022-06-11 09:30:42 -04:00
varjolintu
c1dbe27f25 Emit database changed event on single db lock 2022-06-11 09:29:26 -04:00
J J Chiarella
9e9ed8b532 Update eff_large.wordlist
1. Replaces words removed by pull 6914 <23b9e35de9> for possible offense. This restores the total word count.

Add replacement: grope -> . . . -> grouch

Change: hardcopy -> hardcopy -> hardback

Replace: hardcore -> . . . -> hardball

(I couldn't see "hardcopy" as a single word in American dictionaries from the turn of the century. It's too much of a neologism [and if we can't have "hardcore," then there's nothing else I can fit in that gap]. I had to remove another word to allow the addition of two new words here to preserve ordering. It's also an improvement because "hardcopy" is not a single word in dictionaries older than a decade or so.)

Add replacement: swinger -> . . . -> swindle

2. Yo-yo and yoyo are two spelling of the same exact word, and the latter spelling is "non-standard."

Keeping: yo-yo (t-shirt is the one other hyphenated word and I can't find a suitable candidate for either without creating several conflicts on the long wordlist)

Change: yoyo -> young

3.  Word repetition: two spellings of same word hankie.

Keeping: hankie (as the "correct" spelling because "hanky" is more common in "hanky-panky").

Change: hanky -> hanoi

(The other option was to insert "hansom" between "hanky" and "haphazard," but "handsome" is a homophone because the "d" became silent many years ago.)

4. Changed proper nouns and brand names to regular nouns:

dropbox -> dropforge

ebay -> eaves

google -> goosey as in "loosey-goosey" (the real word is "googol," anyhow)

This necessitated changing goon -> gooseneck

ipad -> iota

iphone -> ire

ipod -> iridium

This necessitated irate -> iris

kleenex -> knack (the word "tissue" exists)

lego -> legitimate

xbox -> xenon (which sounds like x box or x-box, too)

Keeping: xerox (now genericized like aspirin)

5. Replaced non-standard words around "drop" and the brand name in there

drop-down -> drop-in

ebook -> (genericized like "email")

ecard -> echelon

This necessitated eccentric -> echidna

harddisk -> hardedge (Hardedge is an art style. Hard disk is always two words or else is abbreviated as HDD for hard disk drive)

6. Replaced flirtatious activity

footsie -> footstool

Which necessitated making footsore -> footway

7. Potentially sensitive anatomy

gonad -> golly

siamese -> sial (Siamese = Thai, but "twins" is also on the list and "Siamese" could precede "twins," which is slur for conjoined twins.)

8. Politically sensitive

islamist -> island (An Islamist is someone who wants to enforce political Islam on all with a literal and conservative interpretation of the Qu'ran. It does not mean Muslim.)

marxism ->  marzipan (I'm a big old lefty, myself, but I need to be consistent)

********

These necessitated a couple changes to nearby words where a drop-in replacement word did not exist, which required shifting neighboring words slightly.

Alphabetical order preserved and total word count should match EFF's modified and the original Diceware list. No breaking changes.
2022-06-11 09:28:38 -04:00
Felix Stupp
de3d40b644 Add methods isHardwareKeySupported and refreshHardwareKeys to DBus 2022-06-11 09:28:26 -04:00
Jonathan White
20a2a96222 Auto-Type: PICKCHARS can specify attribute and ignore BEEP
* Fix #7726 - Ignore BEEP Auto-Type token when it includes spaces and numbers as well
* Close #8103 - Allow specifying specific attribute to use with PICKCHARS. If none specified, it defaults to Password.
2022-06-09 10:05:03 -04:00
Jonathan White
b1f4e12d34 Improve entry preview panel
* Fix #7811 - Notes height no longer truncated
* Fix #7949 - Improve copying attribute value to clipboard in entry preview
* Fix #7898 - Prevent copying url when copy password selected after clicking url in preview pane
* Fix #7982 - Double clicking hidden attributes in preview pane copies the value instead of ●●●●●●
2022-06-06 07:20:15 -04:00
Michael Ziminsky (Z)
bc0a5a9440 Fix autotype menu entries on Windows 2022-06-05 22:02:23 -04:00
Patrick Sean Klein
e16c007d43 Correct regex escape logic
* Fixes #7776

Implement QRegularExpression::escape within Tools::convertToRegex to allow usage on older Qt versions.

Also wrap EXACT_MODIFIER patterns in a non-capture group to prevent misinterpreted regex.
2022-06-05 21:58:52 -04:00
varjolintu
924eb6dbc4 Pass database locked/unlocked status even with Search All Databases option enabled 2022-06-05 21:30:10 -04:00
Jonathan White
b5e0572155 Fix Auto-Type gui guard for tests
Prevent showing gui error dialogs when no gui is present. This can occur during auto-type tests.
2022-06-05 07:04:34 -04:00
Jonathan White
0f3a2531e7 Fix use of modifiers under macOS
* Fix #6463
2022-06-05 07:04:23 -04:00
Jonathan White
dab7047113 Fix file dialog not appearing on snap build
Fix #7607 - Don't disable core dumps when building for snap distribution. Doing so will not allow the xdg-desktop-portal from opening the file dialog. This is because the portal attempts to call entries from /proc/[pid]/xxxx which are restricted to root when core dumps are disabled.
2022-06-05 07:04:11 -04:00
Toni Spets
6f20f0e2ec docs: Explicitly talk about SSH Agent integration
There's possible confusion that KeePassXC provides its own agent
the way it's worded. Always explicitly talk about integration to
make it more clear.
2022-06-04 16:48:45 -04:00
Aetf
0f7b674cbb FdoSecrets: add smarter handling of database unlock requests
This commit implements the following logic:
* If there're already unlocked collections, just use those,
* otherwise, show the unlock dialog until there's an unlocked and exposed collection.

* Fixes #7574
2022-06-04 16:27:18 -04:00
Aetf
e2bf537c4a FdoSecrets: ask to unlock the database when creating items
Also only emit databaseUnlockFinished after the database is unlocked

Fix #7989
2022-06-04 15:49:34 -04:00
Patrick Sean Klein
c5467c43bf Add database backup path documentation. 2022-06-04 14:49:49 -04:00
SnipFoo
806b8b0901 Add config variable for specifying a default file name for the database 2022-06-04 13:13:49 -04: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
Jonathan White
ba8f787d0d Fix transient errors in GUI tests
* Fix saving file errors due to atomic saves on Windows
* Fix tests that rely on clicking a list index that is out of view
2022-05-30 23:31:34 -04:00