ports/www/phpbb/files/security-patch-includes-sessions.php
Xin LI 048d6d4065 Give the user a chance to disable our local anti-DoS patch, which
appears to be conflict with phpBB's built-in captcha functionality.

Please note that this does not change the default behavior (patch
phpBB for the DoS issue), and this is intentionally undocumented.
Hopefully we can get rid of all these home-grown stuff as the
phpBB make their 2.2-release.

Requested by:	Goyo Roth <sadangel@pow2clk.net>
PR:		ports/93204
Submitted by:	delphij
Approved by:	Kang Liu <liukang@cn.FreeBSD.org>
Approved by:	mentor (sem)
2006-05-07 17:30:59 +00:00

12 lines
595 B
PHP

--- includes/sessions.php.orig Sat May 14 05:04:00 2005
+++ includes/sessions.php Sun May 15 18:53:48 2005
@@ -167,7 +167,7 @@
$sql = "INSERT INTO " . SESSIONS_TABLE . "
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";
- if ( !$db->sql_query($sql) )
+ if ( $user_id != ANONYMOUS && !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
}