mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
auth: Check if we have any prompts.
This commit is contained in:
@@ -1684,9 +1684,10 @@ SSH_PACKET_CALLBACK(ssh_packet_userauth_info_request) {
|
||||
|
||||
nprompts = ntohl(nprompts);
|
||||
ssh_log(session,SSH_LOG_PACKET,"kbdint: %d prompts",nprompts);
|
||||
if (nprompts > KBDINT_MAX_PROMPT) {
|
||||
if (nprompts == 0 ||
|
||||
nprompts > KBDINT_MAX_PROMPT) {
|
||||
ssh_set_error(session, SSH_FATAL,
|
||||
"Too much prompt asked from server: %u (0x%.4x)",
|
||||
"Wrong number of prompts requested by the server: %u (0x%.4x)",
|
||||
nprompts, nprompts);
|
||||
ssh_kbdint_free(session->kbdint);
|
||||
session->kbdint = NULL;
|
||||
|
||||
Reference in New Issue
Block a user