Fix unauthenticated client query buffer 1MB limit (#12989)

Code incorrectly set the limit value to 1024MB.
Introduced in #12961.
This commit is contained in:
Binbin 2024-01-25 20:56:21 +08:00 committed by GitHub
parent 85a834bfa2
commit 4cb5ad85a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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);