Commit Graph

4329 Commits

Author SHA1 Message Date
Yaroslav Isakov
28328a7080 Allow KeePassXC to be built without X11 2022-09-22 06:49:07 -04:00
Jonathan White
fab76c04cc 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-22 06:49:07 -04:00
Klemens Nanni
74e1e7c9d1 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-22 06:49:07 -04:00
Christoph Honal
7de9ab25ab 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-22 06:49:07 -04:00
Dennis
233be1fc10 TouchID support refactoring (#8311)
Fixes #7695 - Properly set compile flags based on availability of watch unlock in the API.
2022-09-22 06:49:07 -04:00
louib
bad015115d [CLI] Add Option to show all attributes (Show command) (#8256)
* Adding --all option to Show
2022-09-22 06:49:07 -04:00
louib
e7e75c1277 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-09-22 06:49:07 -04:00
Jonathan White
e245701533 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-09-22 06:49:07 -04:00
Jonathan White
0cbfbc08f3 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-09-22 06:49:07 -04:00
Daniel Ziegenberg
731c89cc1c 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-09-22 06:49:07 -04:00
Nicolas Roeser
b75abaad08 Align generator logic and UI for math symbols
In the password generator widget, the checkable push button for the math
symbols is missing the GREATER-THAN SIGN (U+003E), even though it is
among the possible characters during password generation when the button
is checked. Add the missing character to the text displayed to users.

While at it, also fix a wrong comment containing the possible
characters.
2022-09-22 06:49:07 -04:00
Hugo
40316ac7b9 Move socket into separate directory (#8030)
This is mostly to ease setup and configuration with sandboxed browsers.

The socket currently existing in `$XDG_RUNTIME_DIR`. When sandboxing a browser, it would be unsafe to mount this directory inside the sandbox.
Mounting the socket into the sandbox's filesystem is also not possible in cases where KeePassXC is [re]started after the browser has started.

This commit moves the socket into its own isolated subdirectory, which can be safely mounted into sandboxes. Sandbox engines can create the directory themselves (in case the browser starts before KeePassXC). Both Flatpak and Firejail support this configuration.

A symlink is also created, linking the previous location to the new location. This is meant for backwards compatibility and should eventually be dropped.

The directory can't be named `org.keepassxc.KeePassXC.BrowserServer`,
since that would collide with the symlink. Instead, the directory has been created to match the format used for Flatpak builds, which make it a bit less of a snowflake build, while following accepted conventions.

Given that the preferred path now matches what Flatpak uses, the block handling Flatpak and non-Flatpak is now the same.

If `$XDG_RUNTIME_DIR` is undefined, the temporary directory is used, though reading the socket from this location is discouraged.

Closes: https://github.com/keepassxreboot/keepassxc/issues/8018
References: https://github.com/keepassxreboot/keepassxc/discussions/6741
2022-09-22 06:49:07 -04:00
Jonathan White
c4f625a3d1 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.

cmake: make libxi and libxtst a requirement with autotype enabled
2022-09-22 06:49:07 -04:00
Jonathan White
d954519e10 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-09-22 06:49:07 -04:00
varjolintu
f0a7c636a4 Browser: Add a new group setting for omitting WWW subdomain when matching URLs 2022-09-22 06:49:07 -04:00
JakobDev
bfeb75c900 Add vcs-browser and contribute URLs to Appdata 2022-09-22 06:49:07 -04:00
varjolintu
19bd6069d7 Emit database changed event on single db lock 2022-09-22 06:49:07 -04:00
J J Chiarella
60d4e06531 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-09-22 06:49:07 -04:00
Felix Stupp
9150febd02 Add methods isHardwareKeySupported and refreshHardwareKeys to DBus 2022-09-22 06:49:07 -04:00
Jonathan White
d8d5ddcab6 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-09-22 06:49:07 -04:00
Jonathan White
8190b20efe 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-09-22 06:49:07 -04:00
Michael Ziminsky (Z)
989348bbfb Fix autotype menu entries on Windows 2022-09-22 06:49:07 -04:00
Patrick Sean Klein
679b93b601 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-09-22 06:49:07 -04:00
varjolintu
d1d191e2b0 Pass database locked/unlocked status even with Search All Databases option enabled 2022-09-22 06:49:07 -04:00
Jonathan White
6f619271c4 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-09-22 06:49:07 -04:00
Jonathan White
3163547096 Fix use of modifiers under macOS
* Fix #6463
2022-09-22 06:49:07 -04:00
Jonathan White
6da7188ecf 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-09-22 06:49:07 -04:00
Toni Spets
35285d72bb 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-09-22 06:49:07 -04:00
Aetf
07755c324a 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-09-22 06:49:07 -04:00
Aetf
8711d31f24 FdoSecrets: ask to unlock the database when creating items
Also only emit databaseUnlockFinished after the database is unlocked

Fix #7989
2022-09-22 06:49:07 -04:00
Patrick Sean Klein
a3c24b4bbc Add database backup path documentation. 2022-09-22 06:49:07 -04:00
SnipFoo
4d20cb1654 Add config variable for specifying a default file name for the database 2022-09-22 06:49:07 -04:00
J.M. Dana
7e8a672de4 Add password strength indicator to PasswordEditWidget
Fixes #7437 (entry edit view only)
Fixes #5220
2022-09-22 06:49:07 -04:00
Aetf
107dcae26c FdoSecrets: skip entries in recycle bin when searching (fix #7933) 2022-09-22 06:49:07 -04:00
Jonathan White
121d54c96a 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-09-22 06:49:07 -04:00
Patrick Sean Klein
6f28b5e2ba Limit zxcvbn entropy estimation length
Limit the use of zxcvbn based password entropy estimation to 256 bytes. After this threshold, the average per-byte entropy from the zxcvbn calculation is added for each additional byte. In practice, this produces a slightly higher entropy calculation for purely randomized passwords than zxcvbn would normally calculate. However, the time to calculate is capped leading to a much better user experience and removing unnecessary calculations.

Fixes #7712
2022-09-22 06:49:07 -04:00
Jérôme Augé
dca70f809d Fix capture of whiptail's exit status
The exit status of `whiptail` was masked by the subsequent call to
`clear`.

This correct the capture of whiptail's exit status so that pressing the
`[Cancel]` button can be correctly detected by the script.

Fixes #7830
2022-09-22 06:49:07 -04:00
Piraty
750a3383ca Link ykcore against pthread (#7807) 2022-09-22 06:49:07 -04:00
hka
dda70e1453 Normalize path (slashes to be precise) when opening a database or saving the last used database paths (#7864)
Fixes #7821
2022-09-22 06:49:07 -04:00
Jonathan White
5916a8f8dd
Update translations 2022-04-05 23:12:34 -04:00
Jonathan White
4ffdc98512
Minor updates to documentation for 2.7.1 2022-04-05 23:11:27 -04:00
Jonathan White
9f402885d8
Version bump to 2.7.1 and Changelog update 2022-04-05 22:09:15 -04:00
Aetf
6b0eeb9722 FdoSecrets: do not share entry <-> item property by multiple unlock prompts
Fixes #7753
2022-04-05 18:08:46 -04:00
Jonathan White
a98bf1eac3 Remove "latest" tag from release name
* Also ensure the current tag contains a proper version string.
2022-04-05 16:56:33 -04:00
louib
7cd824ae1c
Upstream Flathub patches (#7728) 2022-04-04 19:04:18 -04:00
Jonathan White
31db3c325d Fix compiling with minizip-ng
* minizip-ng has slightly different defines and function names than the original minizip. These changes adapt the existing code to use the minizip-ng versions if necessary.
2022-04-03 13:28:39 -04:00
Jonathan White
656e6161a0 Add tags to history comparison 2022-04-03 13:28:39 -04:00
Jonathan White
44be95cc1b Fix crash when building history changes
* Replace rarely hit asserts with defined nullptr checks when replacing references without a group
* Fix #7603
* Replace TOTP history comparison with checking the actual TOTP output instead of a compiled string
2022-04-03 13:28:39 -04:00
Jonathan White
48a3fd8e3c Fix detection of hardware keys in keepassxc-cli
* Split calls to finding hardware keys into sync and async methods. This has the side effect of simplifying the code.
* Check for keys before performing challenge/response if no keys have been found previously.
* Correct timeout of user interaction message to interact with the hardware key.
* Correct error in TestCli::testYubiKeyOption
2022-04-03 13:26:12 -04:00
Jonathan White
7d7c635423 Disable debug messages in release builds
Also correct / remove various debug messages
2022-04-03 13:26:12 -04:00