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>
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.");