diff options
author | Madelyn Olson <matolson@amazon.com> | 2020-02-16 05:41:39 -0800 |
---|---|---|
committer | Madelyn Olson <matolson@amazon.com> | 2020-02-16 05:41:39 -0800 |
commit | c1b5220ee74d6671ae4bbf9c0aa6e44aab83a319 (patch) | |
tree | a44e1d4c12e6d96a11dff683ae56769871c26243 | |
parent | d63a43536277a8514593aa95b9c343c1b6d98cfa (diff) | |
download | redis-c1b5220ee74d6671ae4bbf9c0aa6e44aab83a319.tar.gz |
Give an error message if you specify redirect twice
-rw-r--r-- | src/networking.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c index dad61904d..5b1229fde 100644 --- a/src/networking.c +++ b/src/networking.c @@ -2233,6 +2233,13 @@ NULL if (!strcasecmp(c->argv[j]->ptr,"redirect") && moreargs) { j++; + if (redir != 0) { + addReplyError(c,"A client can only redirect to a single " + "other client"); + zfree(prefix); + return; + } + if (getLongLongFromObjectOrReply(c,c->argv[j],&redir,NULL) != C_OK) { |