Skip to content

Commit 26c8b58

Browse files
committed
Messaging Filtering
1. Add a case for user authentication messages after user authentication completes.
1 parent 863714a commit 26c8b58

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/internal.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,14 @@ INLINE static int IsMessageAllowedServer(WOLFSSH *ssh, byte msg)
586586
return 0;
587587
}
588588
}
589+
else {
590+
if (msg >= MSGID_USERAUTH_RESTRICT && msg < MSGID_USERAUTH_LIMIT) {
591+
WLOG(WS_LOG_DEBUG, "Message ID %u not allowed by server "
592+
"after user authentication", msg);
593+
return 0;
594+
}
595+
}
596+
589597
return 1;
590598
}
591599
#endif /* NO_WOLFSSH_SERVER */
@@ -617,6 +625,13 @@ INLINE static int IsMessageAllowedClient(WOLFSSH *ssh, byte msg)
617625
return 0;
618626
}
619627
}
628+
else {
629+
if (msg >= MSGID_USERAUTH_RESTRICT && msg < MSGID_USERAUTH_LIMIT) {
630+
WLOG(WS_LOG_DEBUG, "Message ID %u not allowed by client "
631+
"after user authentication", msg);
632+
return 0;
633+
}
634+
}
620635
return 1;
621636
}
622637
#endif /* NO_WOLFSSH_CLIENT */

0 commit comments

Comments
 (0)