From ef3f92c70adf03c3e2f5e7d9283bafc9f988a8c1 Mon Sep 17 00:00:00 2001 From: sam marshall Date: Wed, 1 May 2019 11:55:26 +0100 Subject: [PATCH] MDL-65459 Logging: Missed two points relying on non-JSON log format --- admin/tool/log/classes/local/privacy/helper.php | 2 +- lib/classes/task/send_failed_login_notifications_task.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/tool/log/classes/local/privacy/helper.php b/admin/tool/log/classes/local/privacy/helper.php index 95c09e96b59..a90f1fc2cff 100644 --- a/admin/tool/log/classes/local/privacy/helper.php +++ b/admin/tool/log/classes/local/privacy/helper.php @@ -85,7 +85,7 @@ class helper { } else { $name = $record->eventname; $description = "Unknown event ({$name})"; - $other = unserialize($record->other); + $other = \tool_log\helper\reader::decode_other($record->other); } $realuserid = $record->realuserid; diff --git a/lib/classes/task/send_failed_login_notifications_task.php b/lib/classes/task/send_failed_login_notifications_task.php index 6f7e123c6c2..7af752e995b 100644 --- a/lib/classes/task/send_failed_login_notifications_task.php +++ b/lib/classes/task/send_failed_login_notifications_task.php @@ -145,7 +145,7 @@ class send_failed_login_notifications_task extends scheduled_task { $a->time = userdate($log->timecreated); if (empty($log->username)) { // Entries with no valid username. We get attempted username from the event's other field. - $other = unserialize($log->other); + $other = \tool_log\helper\reader::decode_other($log->other); $a->info = empty($other['username']) ? '' : $other['username']; $a->name = get_string('unknownuser'); } else {