Skip to content

Commit

Permalink
Merge pull request #2744 from midnight-wonderer/bug/hostname-matching
Browse files Browse the repository at this point in the history
Fix hostname matching logic. closes #1926
  • Loading branch information
PhilippC authored Feb 11, 2025
2 parents 7577e30 + 980df2b commit 07562cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Kp2aBusinessLogic/SearchDbHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public PwGroup SearchForHost(Database database, String url, bool allowSubdomains
{
continue;
}
if (host.IndexOf(otherHost, StringComparison.InvariantCultureIgnoreCase) > -1)
if (string.Equals(host, otherHost, StringComparison.OrdinalIgnoreCase) ||
host.EndsWith("." + otherHost, StringComparison.OrdinalIgnoreCase))
{
pgResults.AddEntry(entry, false);
}
Expand Down

0 comments on commit 07562cc

Please sign in to comment.