mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Add an option to disable SSH-2 banners.
[originally from svn r9055]
This commit is contained in:
6
ssh.c
6
ssh.c
@ -7194,12 +7194,14 @@ static void ssh2_msg_channel_open(Ssh ssh, struct Packet *pktin)
|
||||
}
|
||||
|
||||
/*
|
||||
* Buffer banner messages for later display at some convenient point.
|
||||
* Buffer banner messages for later display at some convenient point,
|
||||
* if we're going to display them.
|
||||
*/
|
||||
static void ssh2_msg_userauth_banner(Ssh ssh, struct Packet *pktin)
|
||||
{
|
||||
/* Arbitrary limit to prevent unbounded inflation of buffer */
|
||||
if (bufchain_size(&ssh->banner) <= 131072) {
|
||||
if (ssh->cfg.ssh_show_banner &&
|
||||
bufchain_size(&ssh->banner) <= 131072) {
|
||||
char *banner = NULL;
|
||||
int size = 0;
|
||||
ssh_pkt_getstring(pktin, &banner, &size);
|
||||
|
Reference in New Issue
Block a user