0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-19 20:02:18 +02:00

Fix base domain matching

This commit is contained in:
varjolintu 2020-01-13 11:26:45 +02:00 committed by Janek Bevendorff
parent 6f9907a3cb
commit d2e76058cd
2 changed files with 3 additions and 2 deletions

View File

@ -1053,7 +1053,7 @@ bool BrowserService::handleURL(const QString& entryUrl, const QString& url, cons
}
// Filter to match hostname in URL field
if (siteQUrl.host().endsWith(entryQUrl.host())) {
if (siteQUrl.host().endsWith(entryQUrl.host()) && baseDomain(siteQUrl.host()) == baseDomain(entryQUrl.host())) {
return true;
}

View File

@ -298,7 +298,8 @@ void TestBrowser::testSubdomainsAndPaths()
"http://login.github.com/pathtonowhere",
".github.com", // Invalid URL
"www.github.com/",
"https://github" // Invalid URL
"https://github", // Invalid URL
"https://hub.com" // Should not return
};
createEntries(urls, root);