UrlTools does not need to inherit from QObject or even be a class.
It is a collection of regular functions.
refactor(urltools): Make regular expression static
domainHasIllegalCharacters() constructs a QRegularExpression on every call.
Since the pattern is constant, make it static const QRegularExpression
to avoid repeated regex compilation in hot paths
(e.g., domain validation during browsing/passkey operations).
refactor(urltools): Remove the unnecessary convertVariantToUrl function
format code
refactor(urltools): Include What You Use
refactor(urltools): Use URL_WILDCARD directly in implementation
refactor(urltools): some more inprovements
- code format
- use pure Qt functions for the string handling
- use chop to remove the last character of a QString
- make another QRegularExpression static const
* 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]>
This PR splits the GUI source files from the core source files. The immediate goal is to allow the CLI to require only a minimum number of dynamic libraries. The long term goal is to create an architectural boundary around the core module, in preparation of libkdbx.
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.