Skip to content

Commit 07562cc

Browse files
authored
Merge pull request #2744 from midnight-wonderer/bug/hostname-matching
Fix hostname matching logic. closes #1926
2 parents 7577e30 + 980df2b commit 07562cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Kp2aBusinessLogic/SearchDbHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ public PwGroup SearchForHost(Database database, String url, bool allowSubdomains
138138
{
139139
continue;
140140
}
141-
if (host.IndexOf(otherHost, StringComparison.InvariantCultureIgnoreCase) > -1)
141+
if (string.Equals(host, otherHost, StringComparison.OrdinalIgnoreCase) ||
142+
host.EndsWith("." + otherHost, StringComparison.OrdinalIgnoreCase))
142143
{
143144
pgResults.AddEntry(entry, false);
144145
}

0 commit comments

Comments
 (0)