Will this change of code give me a security risk

Makes it possible for admin to specify maximum connections for the board / IP

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Will this change of code give me a security risk

Postby obiku on Tue 28. Dec, 2004 12:35

Because I, as ADMIN, always want to connect to my board, I changed the next lines
Code: Select all
#
#-----[ OPEN ]------------------------------------------------
#
includes/sessions.php

#
#-----[ FIND ]------------------------------------------------
#
$total_users = $db->sql_numrows($result);
if ( $total_users >= $board_config['max_sessions'] )
{
   message_die(CRITICAL_MESSAGE, sprintf('Max connections reatched, (%d) please try again later',$board_config['max_sessions']), '', __LINE__, __FILE__, $sql);
}

#
#-----[ IN-LINE FIND ]------------------------------------------
#
$board_config['max_sessions']
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
&&  $userdata['user_level'] <> ADMIN
#
#-----[ FIND ]------------------------------------------------
#
$total_users = $db->sql_numrows($result);
if ( $total_users >= $board_config['max_sessions'] )
{
   message_die(CRITICAL_MESSAGE, sprintf('Max connections per IP reatched, (%d) please use fewer open windows',$board_config['max_sessions_ip']), '', __LINE__, __FILE__, $sql);
}
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$board_config['max_sessions']
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
&&  $userdata['user_level'] <> ADMIN
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM

But will this give me a securety risk????
obiku
Poster
Poster
 
Posts: 2
Joined: Sat 11. Sep, 2004 11:36

Postby Niels on Sun 02. Jan, 2005 03:18

I see no reasoon it should
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Max sessions [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron