Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4cb5ad85
Unverified
Commit
4cb5ad85
authored
Jan 25, 2024
by
Binbin
Committed by
GitHub
Jan 25, 2024
Browse files
Fix unauthenticated client query buffer 1MB limit (#12989)
Code incorrectly set the limit value to 1024MB. Introduced in #12961.
parent
85a834bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
4cb5ad85
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment