1
1

Server: disallow channel opening till authenticated

Этот коммит содержится в:
Aris Adamantiadis 2013-07-13 22:56:32 +02:00
родитель dd6a0b51ac
Коммит 9d88dcab3e

Просмотреть файл

@ -1054,6 +1054,11 @@ SSH_PACKET_CALLBACK(ssh_packet_channel_open){
msg->channel_request_open.window = ntohl(window);
msg->channel_request_open.packet_size = ntohl(packet_size);
if (session->session_state != SSH_SESSION_STATE_AUTHENTICATED){
ssh_set_error(session,SSH_FATAL, "Invalid state when receiving channel open request (must be authenticated)");
goto error;
}
if (strcmp(type_c,"session") == 0) {
msg->channel_request_open.type = SSH_CHANNEL_SESSION;
SAFE_FREE(type_c);