aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-06-14 10:53:08 +0000
committerChris Smith <toonarmy@phpbb.com>2009-06-14 10:53:08 +0000
commit4758d49b9b661703d2cd5cffaa9c6c443a624e1d (patch)
tree1665c54085cef7d1662c5658649fdf736753862b
parente69fe56634225d771d4d47c2151d9828b1be2b5d (diff)
downloadforums-4758d49b9b661703d2cd5cffaa9c6c443a624e1d.tar
forums-4758d49b9b661703d2cd5cffaa9c6c443a624e1d.tar.gz
forums-4758d49b9b661703d2cd5cffaa9c6c443a624e1d.tar.bz2
forums-4758d49b9b661703d2cd5cffaa9c6c443a624e1d.tar.xz
forums-4758d49b9b661703d2cd5cffaa9c6c443a624e1d.zip
view_log() breaks if the serialized data is corrupt. #46545
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9589 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/functions_admin.php5
2 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index fa05dbf1b3..8be9b27f20 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -104,6 +104,7 @@
<li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)</li>
<li>[Fix] Only change topic/post icon if icons are enabled and user is allowed to. (Bug #46355 - Patch by bantu)</li>
<li>[Fix] Fix saving custom profile fields in ACP if Oracle used (Bug #46015)</li>
+ <li>[Fix] Make view_log() more resilient to corrupt serialized data. (Bug #46545)</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index a1f34792e0..a8e49a12bc 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2419,7 +2419,8 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
if (!empty($row['log_data']))
{
- $log_data_ary = unserialize($row['log_data']);
+ $log_data_ary = @unserialize($row['log_data']);
+ $log_data_ary = ($log_data_ary === false) ? array() : $log_data_ary;
if (isset($user->lang[$row['log_operation']]))
{
@@ -2442,7 +2443,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
$log[$i]['action'] = bbcode_nl2br(censor_text($log[$i]['action']));
}
}
- else
+ else if (!empty($log_data_ary))
{
$log[$i]['action'] .= '<br />' . implode('', $log_data_ary);
}