Skip to content
Snippets Groups Projects
Commit b91e7771 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Apply inactive_hangup option (for dumb terminals) using max_socket_inactivity

this insures that inactive dumb (bot) connections will be disconnected even
when using a script (e.g. animated pause prompt) that doesn't time-out.

Also, if the connected node is the last node (for this sbbs instance), divide
the socket inactivity timeout value in half.

These changes (along with sbbs v3.20) should help with DOS (denial-of-service,
not MS-DOS) prevention.

Mainly for Krueger.
parent cbe72e9c
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -22,10 +22,17 @@ var guest = options.guest && system.matchuser("guest");
if(!bbs.online)
exit();
if(!(console.autoterm&(USER_ANSI | USER_PETSCII | USER_UTF8))) {
console.inactivity_hangup = parseInt(options.inactive_hangup, 10);
log(LOG_NOTICE, "terminal not detected, reducing inactivity hang-up timeout to " + console.inactivity_hangup + " seconds");
var inactive_hangup = parseInt(options.inactive_hangup, 10);
if(inactive_hangup && inactive_hangup < console.max_socket_inactivity
&& !(console.autoterm&(USER_ANSI | USER_PETSCII | USER_UTF8))) {
console.max_socket_inactivity = inactive_hangup;
log(LOG_NOTICE, "terminal not detected, reducing inactivity hang-up timeout to " + console.max_socket_inactivity + " seconds");
}
if(console.max_socket_inactivity > 0 && bbs.node_num == bbs.last_node) {
console.max_socket_inactivity /= 2;
log(LOG_NOTICE, "last node login inactivity timeout reduced to " + console.max_socket_inactivity);
}
for(var c=0; c < options.login_prompts; c++) {
// The "node sync" is required for sysop interruption/chat/etc.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment