Skip to content

Commit

Permalink
Merge pull request #671 from ejohnstown/msgid-filter2
Browse files Browse the repository at this point in the history
Messaging Filtering Followup
  • Loading branch information
JacobBarthelmeh authored Mar 21, 2024
2 parents 863714a + 26c8b58 commit 295e5ab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 295e5ab

Please sign in to comment.