From 74785a8bdaab17cd698028ac0c8ccfb3c570cd5d Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 15 Jun 2011 18:10:15 +0200 Subject: [PATCH] [ticket/10220] Limit user agent value length for storage in login attempt table PHPBB3-10220 --- phpBB/includes/auth/auth_db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index fe3ea30b2a..018d5cce70 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -90,7 +90,7 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for $attempt_data = array( 'attempt_ip' => $ip, - 'attempt_browser' => $browser, + 'attempt_browser' => trim(substr($browser, 0, 149)), 'attempt_forwarded_for' => $forwarded_for, 'attempt_time' => time(), 'user_id' => ($row) ? (int) $row['user_id'] : 0,