diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-08-14 10:28:05 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-08-14 10:28:05 -0500 |
| commit | c99b61a60004b34edf0e93bfdf83cba27f90b6eb (patch) | |
| tree | aad223da11247e97fc72f6cd45e590dbb5019e9e | |
| parent | 48ebdcf79b966ca610c362c377c0170e355ac862 (diff) | |
| download | slskd-c99b61a60004b34edf0e93bfdf83cba27f90b6eb.tar.gz | |
drop incoming searches that only include excluded terms
| -rw-r--r-- | src/slskd/Application.cs | 7 |
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); |
