Commit Graph
261 Commits
Author SHA1 Message Date
Jonathan White 0e9dc777d5 Enforce new-line at end of code files 2025-10-25 19:23:05 -04:00
Jonathan White 06f5df6f1e Fix two problems with URL wildcard matching
* Fixes #12255
* Periods were not being escaped in the url string before being used in a regex resulting in matching 'any character' between domain parts
* Wildcards entered as `*.` were being replaced with simply `*` resulting in unexpected matches to occur. Fixing this has a side effect of `https://*.github.com` NOT matching `https://github.com` which should be the expected behavior. Users can enter both url's if they desire to match the primary and all sub domains or leave out the wildcard entirely to use normal matching behavior.
2025-10-25 19:22:46 -04:00
Jonathan White cb9fe40ebb 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
2025-10-25 19:17:35 -04:00
Jonathan White 6760865487 Don't add space to invalid TOTP strings
* Fixes #11357
* Introduces validity parameter to TOTP generator function for future use elsewhere in the code base
* Fixes this in preview panel and TOTP dialog
* Disable actions to copy/show TOTP if the settings are invalid
* Show an error message on the TOTP setup dialog if the settings are invalid
* Show a TOTP icon with an x if the settings are invalid
2025-06-19 17:56:41 -04:00
varjolintu 5671e3ad41 Passkeys: Fix ordering of clientDataJSON 2025-06-19 17:42:34 -04:00
varjolintu 969b56d3ff Explicitly allow access to newly created browser group 2025-06-19 17:42:23 -04:00
varjolintu 8491f11e64 Fix settings native messaging path with Tor Browser launcher in Linux 2025-06-19 17:41:16 -04:00
Jonathan White a892385f15 Allow groups to restrict by browser integration key (#6437) 2025-05-17 16:26:06 -04:00
Jonathan White 903b8f189e Improve browser notice about snap/flatpak support 2025-02-22 20:45:19 -05:00
Jonathan Whiteandvarjolintu 3af68b1d3f Add support for URL wildcards and exact URL (#9835)
* Add support for URL wildcards with Additional URL feature

* Only check TLD if wildcard is used

* Avoid using network function in no-feature build

---------

Co-authored-by: varjolintu <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
2025-02-10 19:32:27 -05:00
Jonathan White d655d18a79 Trim file path settings fields prior to save
* Fixes #11630
2025-02-02 09:15:29 -05:00
Jonathan White 2364e4cd4a Fix renaming extension key name in Database Settings 2025-01-03 18:17:07 -05:00
Sami Vänttinen da606923e9 Browser: Fix cancel with database unlock dialog (#11435) 2024-12-21 23:39:58 -05:00
Sami Vänttinen 383c6d05d1 Support passkeys with Bitwarden import (#11401) 2024-12-21 23:25:15 -05:00
Jonathan White aeee40048c Add support for group selection when creating a passkey 2024-10-07 17:45:34 -04:00
varjolintu 292046ff7f Allow deleting extension plugin data from Browser Statistics 2024-09-13 22:48:51 -04:00
varjolintu 41de1dff2d Browser: Resolve references in Access Confirm dialog 2024-08-13 22:35:34 -04:00
Jonathan White 3d66618818 Refactor browser Access Control Dialog (#9607) 2024-08-13 22:35:16 -04:00
Peter Mescalchin bfa64aa8f0 Update URLs to Chrome Web Store page for KeePassXC-Browser extension 2024-06-30 22:23:56 -04:00
James CarrollandJonathan White ee08ef421d Snap: Improve Web-browser Native Messaging host functionality (#10906)
* Snap: Improve Web-browser Native Messaging host functionality

This commit allows for the snap distribution of KeepassXC to self-manage native messaging manifests
This is done by making the binary aware of the snapd environment changes that currently prevent this.
Furthermore, the snap sandbox is expanded to the bare minimum needed to access these privileged files.

Please note if running a self-compiled / untrusted KeepassXC snap build (I.E, installed with --dangerous)
that you must manually run `sudo snap connect keepassxc:browser-native-messaging` to grant permissions.

This will work on all distributions that expose `/snap/bin/` - such as Ubuntu, Debian, etc.
For systems which don't provide `/snap/`, such as Fedora, follow instructions for enabling "Classic" snaps.
e.g., `sudo ln -s /var/lib/snapd/snap /snap`

---------

Co-authored-by: Jonathan White <[email protected]>
2024-06-19 15:50:52 -04:00
varjolintu e7f9d58541 Passkeys: Fix incorrect username fill 2024-06-16 17:10:17 -04:00
varjolintu 8bdc7c4702 Passkeys: Return authenticatorData and publicKeyAlgorithm to extension 2024-06-16 17:10:00 -04:00
Carlo TeubnerandChristoph Reiter 018686afeb Cleanup compiler warnings on all platforms (#10847)
Fixes #10730.

Co-authored-by: Christoph Reiter <[email protected]>
2024-06-16 17:09:48 -04:00
Carlo Teubner e26dbc5608 Botan: don't call deprecated functions (#10826)
* Botan: use raw_private_key_bits() if available

Botan 3.x introduces raw_private_key_bits() as an alias for
get_private_key(), and deprecates the latter.

* Botan: use Cipher_Dir::Encryption

Botan 3.x introduces Cipher_Dir::Encryption as an alias for
Cipher_Dir::ENCRYPTION, and deprecates the latter. Likewise for
Decryption/DECRYPTION.
2024-06-02 07:38:50 -04:00
Jonathan White 6fbab25478 Add action item for removing a passkey from entry (#10777) 2024-06-02 07:38:03 -04:00
Jonathan White 1bdf1bbbed Fix portable mode detection for native messaging files
* Fixes #10755
2024-06-02 07:34:29 -04:00
Jonathan White c9d71e7781 Passkeys: Register to an existing entry 2024-05-05 16:07:00 -04:00
Jonathan White 485c446013 Fix password generator close button for good
* Avoids using QDialog which breaks the standalone password generator

Revert "Fix password dialog close button"

This reverts commit 5b47190fcc.
2024-04-29 07:37:35 -04:00
Sami Vänttinen 8f03f2f59e Passkeys: Pass extension JSON data to browser (#10615) 2024-04-27 23:35:07 -04:00
varjolintu dbc7f020fd Passkeys: Position the confirm dialog with the parent window 2024-04-27 23:35:07 -04:00
varjolintu 50eec240b4 Passkeys: Fix duplicate database selection 2024-04-27 23:35:07 -04:00
varjolintu bd5984ca82 Passkeys: Fix RP ID validation 2024-04-27 23:20:43 -04:00
varjolintu 969d3f9b23 Passkeys: Do not ask update with a new user handle 2024-04-27 23:20:38 -04:00
Sami Vänttinen 305fd24a8e Passkeys: Fix compatibility with StrongBox (#10420) 2024-04-27 23:20:28 -04:00
varjolintu 97cf35c993 Passkeys: Allow nfc and usb transports 2024-04-27 23:20:18 -04:00
Jonathan White b7a1c620e4 Passkeys improvements (#10318)
Refactors the Passkey implementation to include more checks and a structure that is more aligned with the official specification.
Notable changes:
- _BrowserService_ no longer does the checks by itself. A new class _BrowserPasskeysClient_ constructs the relevant objects, acting as a client. _BrowserService_ only acts as a bridge between the client and _BrowserPasskeys_ (authenticator) and calls the relevant popups for user interaction.
- A new helper class _PasskeyUtils_ includes the actual checks and parses the objects.
- _BrowserPasskeys_ is pretty much intact, but some functions have been moved to PasskeyUtils.
- Fixes Ed25519 encoding in _BrowserCBOR_.
- Adds new error messages.
- User confirmation for Passkey retrieval is also asked even if `discouraged` is used. This goes against the specification, but currently there's no other way to verify the user.
- `cross-platform` is also accepted for compatibility. This could be removed if there's a potential issue with it.
- Extension data is now handled correctly during Authentication.
- Allowed and excluded credentials are now handled correctly.
- `KPEX_PASSKEY_GENERATED_USER_ID` is renamed to `KPEX_PASSKEY_CREDENTIAL_ID`
- Adds a new option "Allow localhost with Passkeys" to Browser Integration -> Advanced tab. By default it's not allowed to access HTTP sites, but `http://localhost` can be allowed for debugging and testing purposes for local servers.
- Add tag `Passkey` to a Passkey entry, or an entry with an imported Passkey.

Fixes #10287.
2024-03-09 15:21:46 -05:00
varjolintu cb5d3ed21d Fix raising Update Entry messagebox 2024-01-30 18:26:45 -05:00
Jonathan White 4bd9fdd7a4 Passkeys: UI adjustments 2024-01-30 18:26:45 -05:00
varjolintu fe739578ab Passkeys: Create AAGUID for KeePassXC 2024-01-30 18:26:45 -05:00
varjolintu 3f77678b5c Passkeys: Fix default timeout on authentication 2024-01-30 18:26:45 -05:00
Jonathan White c477f43c40 Passkeys: Add support for importing Passkey to entry (#9987)
---------
Co-authored-by: Jonathan White <[email protected]>
2024-01-30 18:26:45 -05:00
varjolintu 7371589955 Rename userId to credentialId 2024-01-30 18:26:45 -05:00
Jonathan White 1cbbcff259 Create new UrlTools class
Includes "Fix ifdefs with UrlTools"
2024-01-30 18:26:45 -05:00
Jonathan Whiteandvarjolintu 416581b179 Add basic support for WebAuthn (Passkeys) (#8825)
---------

Co-authored-by: varjolintu <[email protected]>
Co-authored-by: droidmonkey <[email protected]>
2024-01-30 18:26:45 -05:00
Jonathan White 82c1bf4ddb Fix support for referenced URL fields 2024-01-30 18:26:45 -05:00
Sami Vänttinen 7f33868d14 Fix crash on database open from browser (#9939) 2024-01-30 18:26:45 -05:00
Jonathan WhiteandSami Vänttinen c5312d63f2 Fix various bugs when returning credentials (#9136)
Co-authored-by: Sami Vänttinen <[email protected]>
2024-01-30 18:26:45 -05:00
Jonathan Whiteandvarjolintu e401e8f4bc Browser Integration code cleanup (#8489)
Co-authored-by: varjolintu <[email protected]>
2024-01-30 18:26:45 -05:00
Jonathan White 742a4f8980 Exclude Flatpak and Snap from proxy detection warning 2023-08-15 07:28:11 -04:00
Sami Vänttinenandvarjolintu eee4ca9a26 Improve duplicate URL warning (#9635)
Co-authored-by: varjolintu <[email protected]>
2023-08-14 07:04:48 -04:00