From a6a0d2f77c7d1f06829c301914585a3d873fcd39 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 10 Sep 2022 21:52:54 -0700 Subject: [PATCH] Require a newer protocol to specify the digest list. --- clientserver.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/clientserver.c b/clientserver.c index 7436d01e..9ad7eaf7 100644 --- a/clientserver.c +++ b/clientserver.c @@ -184,11 +184,11 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int } if (remote_sub < 0) { - if (remote_protocol == 30) { + if (remote_protocol >= 30) { if (am_client) - rprintf(FERROR, "rsync: server is speaking an incompatible beta of protocol 30\n"); + rprintf(FERROR, "rsync: the server omitted the subprotocol value: %s\n", buf); else - io_printf(f_out, "@ERROR: your client is speaking an incompatible beta of protocol 30\n"); + io_printf(f_out, "@ERROR: your client omitted the subprotocol value: %s\n", buf); return -1; } remote_sub = 0; @@ -200,6 +200,12 @@ static int exchange_protocols(int f_in, int f_out, char *buf, size_t bufsiz, int daemon_auth_choices = strdup(daemon_auth_choices + 1); if ((cp = strchr(daemon_auth_choices, '\n')) != NULL) *cp = '\0'; + } else if (remote_protocol > 31) { + if (am_client) + rprintf(FERROR, "rsync: the server omitted the digest name list: %s\n", buf); + else + io_printf(f_out, "@ERROR: your client omitted the digest name list: %s\n", buf); + return -1; } if (protocol_version > remote_protocol) { -- 2.47.2