From c99b61a60004b34edf0e93bfdf83cba27f90b6eb Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 14 Aug 2022 10:28:05 -0500 Subject: drop incoming searches that only include excluded terms --- src/slskd/Application.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index 29b6f656..63b29d84 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -881,6 +881,13 @@ namespace slskd return null; } + // sometimes clients send search queries consisting only of exclusions; drop them. + // no other clients send search results for these, even though it is technically possible. + if (!query.Terms.Any()) + { + return null; + } + try { var results = await Shares.SearchAsync(query); -- cgit v1.2.3