From 955e00fbec2bf9cb2dbe53fceef00941681bfbd4 Mon Sep 17 00:00:00 2001 From: xhe Date: Thu, 24 Dec 2020 19:23:30 +0800 Subject: [PATCH] ask protover for authentication Signed-off-by: xhe --- src/networking.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/networking.c b/src/networking.c index 6d571aad1..66e91c521 100644 --- a/src/networking.c +++ b/src/networking.c @@ -2769,6 +2769,11 @@ void helloCommand(client *c) { return; } + if (!ver && next_arg < c->argc) { + addReplyError(c,"Authentication needs to provide an protocol version"); + return; + } + for (int j = next_arg; j < c->argc; j++) { int moreargs = (c->argc-1) - j; const char *opt = c->argv[j]->ptr;