CLIENT_MASTER should ignore server.proto_max_bulk_len

(cherry picked from commit 589e610ebc)
This commit is contained in:
zhaozhao.zz
2020-09-01 09:27:58 +03:00
committed by Oran Agra
parent d3831559cf
commit 3c87d572b9
+2 -1
View File
@@ -1691,7 +1691,8 @@ int processMultibulkBuffer(client *c) {
}
ok = string2ll(c->querybuf+c->qb_pos+1,newline-(c->querybuf+c->qb_pos+1),&ll);
if (!ok || ll < 0 || ll > server.proto_max_bulk_len) {
if (!ok || ll < 0 ||
(!(c->flags & CLIENT_MASTER) && ll > server.proto_max_bulk_len)) {
addReplyError(c,"Protocol error: invalid bulk length");
setProtocolError("invalid bulk length",c);
return C_ERR;