diff --git a/ChangeLog b/ChangeLog index a827292689..743183a2f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.5.5.0 (not yet released) - issue Undefined index: is_ajax_request - issue #11855 Fix password change on MariaDB 10.1 and newer +- issue #11874 Validate version information before further processing it 4.5.4.0 (not yet released) - issue #11724 live data edit of big sets is not working diff --git a/libraries/VersionInformation.php b/libraries/VersionInformation.php index e889b9c683..3821c7c834 100644 --- a/libraries/VersionInformation.php +++ b/libraries/VersionInformation.php @@ -87,13 +87,19 @@ class VersionInformation } } + /* Parse response */ $data = json_decode($response); - if (is_object($data) - && ! empty($data->version) - && ! empty($data->releases) - && ! empty($data->date) - && $save + + /* Basic sanity checking */ + if (! is_object($data) + || empty($data->version) + || empty($data->releases) + || empty($data->date) ) { + return null; + } + + if ($save) { if (! isset($_SESSION) && ! defined('TESTSUITE')) { ini_set('session.use_only_cookies', 'false'); ini_set('session.use_cookies', 'false');