Skip to content

Commit

Permalink
Fix unauthenticated client query buffer 1MB limit
Browse files Browse the repository at this point in the history
Code incorrectly set the limit value to 1024MB.
Introduced in redis#12961.
  • Loading branch information
enjoy-binbin committed Jan 25, 2024
1 parent 85a834b commit 7233ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7233ff6

Please sign in to comment.