diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-10-11 02:00:43 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-10-11 02:00:43 +0300 |
commit | eb965d4ff002943ce926c99267511af55dee10cf (patch) | |
tree | 61e3f6607e9f4e4c97621e9220771251f3a3491e /core/Concurrency | |
parent | 8c07b4d61e662c77f1eb249d22256c5fa98ab496 (diff) |
Implements wrapper method for a more secure unserialize with PHP 7 (#13285)
* Implements wrapper method for a more secure unserialize
* run AllTests on PHP 7
* trigger a debug message if unserialize fails on PHP 7 + tests
* Add string to deserialize to debug log.
Diffstat (limited to 'core/Concurrency')
-rw-r--r-- | core/Concurrency/DistributedList.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Concurrency/DistributedList.php b/core/Concurrency/DistributedList.php index 572b25d6ff..a01f27c1d8 100644 --- a/core/Concurrency/DistributedList.php +++ b/core/Concurrency/DistributedList.php @@ -7,6 +7,7 @@ */ namespace Piwik\Concurrency; +use Piwik\Common; use Piwik\Container\StaticContainer; use Piwik\Option; use Psr\Log\LoggerInterface; @@ -160,7 +161,7 @@ class DistributedList $result = array(); if ($array - && ($array = unserialize($array)) + && ($array = Common::safe_unserialize($array)) && count($array) ) { $result = $array; |