Skip to content

Commit

Permalink
fix hostname matching logic
Browse files Browse the repository at this point in the history
  • Loading branch information
midnight-wonderer committed Jan 14, 2025
1 parent 81b48a3 commit 980df2b
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 980df2b

Please sign in to comment.