From 003daf3db8702f9e883a22e255b5cdab4ae4e9d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Moyne?= Date: Wed, 30 Aug 2023 15:27:26 -0700 Subject: [PATCH] Fixes possible message duplication in sourcing streams if upgrading to 2.10 and then back down to 2.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2.10 adds a couple space separated fields to the sourcing message header from 2 to 4 but the current 2.9 code is too strict of checking the number of fields is exactly 2 rather than at least 2 Signed-off-by: Jean-Noël Moyne --- server/stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/stream.go b/server/stream.go index d03306d7..a2d86f64 100644 --- a/server/stream.go +++ b/server/stream.go @@ -2983,7 +2983,7 @@ func streamAndSeq(shdr string) (string, uint64) { } // New version which is stream index name sequence fields := strings.Fields(shdr) - if len(fields) != 2 { + if len(fields) < 2 { return _EMPTY_, 0 } return fields[0], uint64(parseAckReplyNum(fields[1]))