Commit 5b49dab0 authored by deuce's avatar deuce
Browse files

Toss invalid session connections into badlogin().

parent 6e2a948a
......@@ -5444,6 +5444,15 @@ NO_SSH:
GCESS(i, client_socket, sbbs->ssh_session, "getting channel type");
if (tnamelen != 7 || strnicmp(tname, "session", 7)) {
lprintf(LOG_INFO, "%04d SSH active channel '%s' is not 'session', disconnecting.", client_socket, tname);
identity = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_USERNAME);
p = get_crypt_attribute(sbbs->ssh_session, CRYPT_SESSINFO_PASSWORD);
sbbs->badlogin(identity, p);
if (identity != NULL)
identity = NULL;
if (p != NULL)
p = NULL;
// Fail because there's no session.
ssh_failed = 3;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment