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]>
This commit is contained in:
authored and GitHub committed 2025-02-09 20:03:15 -05:00
1 parent 51e8c042af
commit 9ba6ada266
11 files changed
+317 -36

No files matched your search

+19 -3
View File
@@ -381,16 +381,32 @@ QString Entry::url() const
return m_attributes->value(EntryAttributes::URLKey);
}
QString Entry::resolveUrl() const
{
const auto entryUrl = url();
if (entryUrl.isEmpty()) {
return {};
}
return EntryAttributes::matchReference(entryUrl).hasMatch() ? resolveMultiplePlaceholders(entryUrl) : entryUrl;
}
QStringList Entry::getAllUrls() const
{
QStringList urlList;
auto entryUrl = url();
const auto entryUrl = resolveUrl();
if (!entryUrl.isEmpty()) {
urlList << (EntryAttributes::matchReference(entryUrl).hasMatch() ? resolveMultiplePlaceholders(entryUrl)
: entryUrl);
urlList << entryUrl;
}
return urlList << getAdditionalUrls();
}
QStringList Entry::getAdditionalUrls() const
{
QStringList urlList;
for (const auto& key : m_attributes->keys()) {
if (key.startsWith(EntryAttributes::AdditionalUrlAttribute)
|| key == QString("%1_RELYING_PARTY").arg(EntryAttributes::PasskeyAttribute)) {