mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-09-20 04:44:43 -04:00
Prevent using URL wildcards in TLD
This commit is contained in:
parent
9ba6ada266
commit
0b5ae1775c
2 changed files with 5 additions and 1 deletions
|
@ -195,7 +195,7 @@ bool UrlTools::isUrlValid(const QString& urlField, bool looseComparison) const
|
|||
// Prevent TLD wildcards
|
||||
if (looseComparison && url.contains(UrlTools::URL_WILDCARD)) {
|
||||
const auto tld = getTopLevelDomainFromUrl(url);
|
||||
if (qUrl.host() == QString("%1.%2").arg(UrlTools::URL_WILDCARD, tld)) {
|
||||
if (tld.contains(UrlTools::URL_WILDCARD) || qUrl.host() == QString("%1.%2").arg(UrlTools::URL_WILDCARD, tld)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue