From 7233ff6b4af5a853348d65fb3b6182789c95c400 Mon Sep 17 00:00:00 2001 From: Binbin Date: Thu, 25 Jan 2024 20:45:39 +0800 Subject: [PATCH] Fix unauthenticated client query buffer 1MB limit Code incorrectly set the limit value to 1024MB. Introduced in #12961. --- src/networking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networking.c b/src/networking.c index f8e3c14ae32..9c969c13740 100644 --- a/src/networking.c +++ b/src/networking.c @@ -2726,7 +2726,7 @@ void readQueryFromClient(connection *conn) { * * For unauthenticated clients, the query buffer cannot exceed 1MB at most. */ (c->mstate.argv_len_sums + sdslen(c->querybuf) > server.client_max_querybuf_len || - (c->mstate.argv_len_sums + sdslen(c->querybuf) > 1024*1024*1024 && authRequired(c)))) { + (c->mstate.argv_len_sums + sdslen(c->querybuf) > 1024*1024 && authRequired(c)))) { sds ci = catClientInfoString(sdsempty(),c), bytes = sdsempty(); bytes = sdscatrepr(bytes,c->querybuf,64);