From 4cb5ad85a5e9669f878f4493e5a08eac4f0e0142 Mon Sep 17 00:00:00 2001 From: Binbin Date: Thu, 25 Jan 2024 20:56:21 +0800 Subject: [PATCH] Fix unauthenticated client query buffer 1MB limit (#12989) 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 f8e3c14ae..9c969c137 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);