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
9018388c
Commit
9018388c
authored
Dec 19, 2018
by
antirez
Browse files
RESP3: Allow any command in RESP3 Pub/Sub mode.
parent
a4f8f4a8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/server.c
View file @
9018388c
...
...
@@ -2681,8 +2681,9 @@ int processCommand(client *c) {
return
C_OK
;
}
/* Only allow SUBSCRIBE and UNSUBSCRIBE in the context of Pub/Sub */
if
(
c
->
flags
&
CLIENT_PUBSUB
&&
/* Only allow a subset of commands in the context of Pub/Sub if the
* connection is in RESP2 mode. With RESP3 there are no limits. */
if
((
c
->
flags
&
CLIENT_PUBSUB
&&
c
->
resp
==
2
)
&&
c
->
cmd
->
proc
!=
pingCommand
&&
c
->
cmd
->
proc
!=
subscribeCommand
&&
c
->
cmd
->
proc
!=
unsubscribeCommand
&&
...
...
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