From 1393668c45d92458c64a0cc8c05b3f49e03ef12d Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 27 Jul 2007 09:42:53 +0000 Subject: [PATCH] fix session problems for those using mysql in strict mode and users having a browser agent string > 150 characters. git-svn-id: file:///svn/phpbb/trunk@7956 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 4 +--- phpBB/includes/session.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 50b1d1f52d..155707a97f 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -281,11 +281,9 @@ p a {
  • [Fix] Cached stylesheet now supporting gzip compression
  • [Fix] Added link to inbox for deleted PMs (Bug #13813)
  • [Fix] Re-syncing the board stats also refreshes the newest user (Bug #13831)
  • - - -
  • [Feature] Ability to externally set $phpbb_root_path if wrapping phpBB3 by defining constant PHPBB_ROOT_PATH
  • [Fix] Implemented correct left/right floating within ACP in regard to RTL languages (Bug #13777)
  • +
  • [Fix] Fixing session problems when using MySQL strict mode in conjunction with very long browser agent string (Bug #13827)
  • diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index c9e12b77e2..a100723972 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -567,7 +567,7 @@ class session 'session_start' => (int) $this->time_now, 'session_last_visit' => (int) $this->data['session_last_visit'], 'session_time' => (int) $this->time_now, - 'session_browser' => (string) $this->browser, + 'session_browser' => (string) substr($this->browser, 0, 149), 'session_forwarded_for' => (string) $this->forwarded_for, 'session_ip' => (string) $this->ip, 'session_autologin' => ($session_autologin) ? 1 : 0,