]> git.ozlabs.org Git - ppp.git/commitdiff
Accept Malformed Windows Success Message (#156)
authoryannayl <yannayl@users.noreply.github.com>
Fri, 7 Aug 2020 00:20:30 +0000 (03:20 +0300)
committerGitHub <noreply@github.com>
Fri, 7 Aug 2020 00:20:30 +0000 (10:20 +1000)
Windows Server 2019 skip a space when sending a success message.
This commit accepts such a malformed message and continues normally.

Signed-off-by: Yannay Linveh <yannayl@gmail.com>
Signed-off-by: yannayl <yannayl@users.noreply.github.com>
pppd/chap_ms.c

index 1de50428fa4d5636c514957734dd1840c1fc76e5..ffb6bd13c1ef45bc4956db1ee6bf494576444df0 100644 (file)
@@ -423,6 +423,8 @@ chapms2_check_success(int id, unsigned char *msg, int len)
        len -= MS_AUTH_RESPONSE_LENGTH;
        if ((len >= 3) && !strncmp((char *)msg, " M=", 3)) {
                msg += 3; /* Eat the delimiter */
+       } else  if ((len >= 2) && !strncmp((char *)msg, "M=", 2)) {
+               msg += 2; /* Eat the delimiter */
        } else if (len) {
                /* Packet has extra text which does not begin " M=" */
                error("MS-CHAPv2 Success packet is badly formed.");