Unverified Commit 4cb5ad85 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

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

Code incorrectly set the limit value to 1024MB.
Introduced in #12961.
parent 85a834bf
...@@ -2726,7 +2726,7 @@ void readQueryFromClient(connection *conn) { ...@@ -2726,7 +2726,7 @@ void readQueryFromClient(connection *conn) {
* *
* For unauthenticated clients, the query buffer cannot exceed 1MB at most. */ * 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) > 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(); sds ci = catClientInfoString(sdsempty(),c), bytes = sdsempty();
bytes = sdscatrepr(bytes,c->querybuf,64); bytes = sdscatrepr(bytes,c->querybuf,64);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment