aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-08-14 11:15:10 -0500
committerGitHub <noreply@github.com>2022-08-14 11:15:10 -0500
commite071a44866c63575189db162c96eb32e189c4c77 (patch)
treeaad223da11247e97fc72f6cd45e590dbb5019e9e /src
parent48ebdcf79b966ca610c362c377c0170e355ac862 (diff)
parentc99b61a60004b34edf0e93bfdf83cba27f90b6eb (diff)
downloadslskd-e071a44866c63575189db162c96eb32e189c4c77.tar.gz
Merge pull request #589 from slskd/search
Drop incoming search requests that only include excluded terms
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Application.cs7
1 files changed, 7 insertions, 0 deletions
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);