diff --git a/Library/Bootstrap.php b/Library/Bootstrap.php index b433c9e..df72fa3 100644 --- a/Library/Bootstrap.php +++ b/Library/Bootstrap.php @@ -4,7 +4,7 @@ header('Cache-Control: no-cache, must-revalidate'); # Constants declaration -define('CURRENT_VERSION', '1.3.0'); +define('CURRENT_VERSION', '1.3.1'); # PHP < 5.3 Compatibility if (defined('ENT_IGNORE') === false) { diff --git a/Library/Data/Analysis.php b/Library/Data/Analysis.php index 23db341..a741abf 100644 --- a/Library/Data/Analysis.php +++ b/Library/Data/Analysis.php @@ -71,9 +71,16 @@ public static function diff($array, $stats) # Diff for each key foreach ($stats as $key => $value) { - if (isset($array[$key])) { - $stats[$key] = $value - $array[$key]; - } + + if (!isset($array[$key])) + continue; + + # Make sure we're dealing with a real number + $v = $array[$key]; + if (!is_float($v) && !is_int($v)) + continue; + + $stats[$key] = $value - $v; } return $stats; diff --git a/README.md b/README.md index 92a5f5d..a6a1f52 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # PHPMemcachedAdmin # +PHPMemcachedAdmin contains critical security bug (up to, and including v 1.3.0) which allows for remote code execution. This repository is aimed to increase PMA security by fixing this bug and (optionally) adding login option. + ### Graphic stand-alone administration for memcached to monitor and debug purpose ### This program allows to see in **real-time** (top-like) or from the start of the server, **stats for get, set, delete, increment, decrement, evictions, reclaimed, cas command**, as well as **server stats** (network, items, server version) with googlecharts and **server internal configuration** @@ -45,4 +47,4 @@ Unzip/Untar & Give files permissions You have to give **Read & Execute right to all files**, and **Read, Write & Execute to configuration files and temporary directory**. -More information in https://blog.elijaa.org/phpmemcachedadmin-installation-guide/ \ No newline at end of file +More information in https://blog.elijaa.org/phpmemcachedadmin-installation-guide/ diff --git a/View/Stats/Stats.phtml b/View/Stats/Stats.phtml index 7903a17..f1abe3a 100644 --- a/View/Stats/Stats.phtml +++ b/View/Stats/Stats.phtml @@ -222,6 +222,26 @@ if((isset($_REQUEST['server'])) && ($_ini->server($_REQUEST['server']))) Evicted unfetched + + if (isset($stats['*reclaimed_fast'])) { // Additional attributes for custom memcached build ?> +