diff --git a/src/internal.c b/src/internal.c index 6575c3b9c..3adeda6e1 100644 --- a/src/internal.c +++ b/src/internal.c @@ -586,6 +586,14 @@ INLINE static int IsMessageAllowedServer(WOLFSSH *ssh, byte msg) return 0; } } + else { + if (msg >= MSGID_USERAUTH_RESTRICT && msg < MSGID_USERAUTH_LIMIT) { + WLOG(WS_LOG_DEBUG, "Message ID %u not allowed by server " + "after user authentication", msg); + return 0; + } + } + return 1; } #endif /* NO_WOLFSSH_SERVER */ @@ -617,6 +625,13 @@ INLINE static int IsMessageAllowedClient(WOLFSSH *ssh, byte msg) return 0; } } + else { + if (msg >= MSGID_USERAUTH_RESTRICT && msg < MSGID_USERAUTH_LIMIT) { + WLOG(WS_LOG_DEBUG, "Message ID %u not allowed by client " + "after user authentication", msg); + return 0; + } + } return 1; } #endif /* NO_WOLFSSH_CLIENT */