Merge pull request #671 from ejohnstown/msgid-filter2

Messaging Filtering Followup
pull/673/head
JacobBarthelmeh 2024-03-22 01:08:20 +07:00 committed by GitHub
commit 295e5abe7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 0 deletions

View File

@ -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 */