1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00
freebsd-ports/www/phpbb/files/patch-includes-sessions.php
Pav Lucistnik 802504d61c - Plug IP spoofing vulnerablity
http://www.vuxml.org/freebsd/cfe17ca6-6858-4805-ba1d-a60a61ec9b4d.html
- Plug sessions table exhaustion DoS attack
  http://www.securityfocus.com/archive/1/360931

PR:		ports/66150
Submitted by:	Xin LI <delphij@frontfree.net> (maintainer)
2004-05-06 10:07:06 +00:00

19 lines
648 B
PHP

--- includes/sessions.php.orig Sun Jul 20 17:42:23 2003
+++ includes/sessions.php Thu May 6 12:02:56 2004
@@ -147,7 +147,7 @@
$sql = "INSERT INTO " . SESSIONS_TABLE . "
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in)
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)";
- if ( !$db->sql_query($sql) )
+ if ( $user_id != ANONYMOUS && !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
}
@@ -380,4 +380,4 @@
return $url;
}
-?>
\ No newline at end of file
+?>