From 0a0554156542adeb5ab299e1153720b36a2260b8 Mon Sep 17 00:00:00 2001 From: Michael Shi Date: Thu, 16 May 2024 12:53:29 -0400 Subject: [PATCH] Fixed unexpected behaviour of returning an index less than the length of the list when it comes to searching the list of bannedSignatures, due to slice ordering --- replay.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/replay.go b/replay.go index 332d33c..c98abbd 100644 --- a/replay.go +++ b/replay.go @@ -50,8 +50,10 @@ func IsSignatureBanned(signature string) bool { defer bannedMutex.RUnlock() for _, list := range bannedSignatures { - if sort.SearchStrings(list, signature) < len(list) { - return true + for _, entry := range list { + if entry == signature { + return true + } } }