Hi Thomas:
On 2/8/08, Jesse Becker <[EMAIL PROTECTED]> wrote:
> This is a bug that is fixed in the svn trunk. I submitted a patch
> back on 17 Jan 2008, and am pretty sure it was applied (yep, as r926).
> The bug was introduced in r919 I think--check the email thread, it's
> listed there.
Yes, apparently this was a bug introduced in 3.0.6, as a workaround,
please apply the following patch in your Ganglia docroot:
--- trunk/monitor-core/web/functions.php 2008/01/18 08:27:34 925
+++ trunk/monitor-core/web/functions.php 2008/01/18 09:26:34 926
@@ -432,6 +432,14 @@
}
#-------------------------------------------------------------------------------
+# If arg is a valid floating point number, return it. Otherwise, return null.
+function clean_float( $value ) {
+ return preg_match('/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/', $value) ?
+ $value :
+ null;
+}
+
+#-------------------------------------------------------------------------------
# Return true if string is a 3 or 6 character hex color. Return
false otherwise.
function is_valid_hex_color( $string )
{
--- trunk/monitor-core/web/graph.php 2008/01/18 08:27:34 925
+++ trunk/monitor-core/web/graph.php 2008/01/18 09:26:34 926
@@ -23,7 +23,7 @@
$min = isset($_GET["n"]) ?
clean_number( rawurldecode($_GET["n"] ) ) : NULL;
$value = isset($_GET["v"]) ?
- clean_number( rawurldecode( $_GET["v"] ) ) : NULL;
+ clean_float( rawurldecode( $_GET["v"] ) ) : NULL;
$load_color = isset($_GET["l"]) && is_valid_hex_color( rawurldecode(
$_GET[ 'l' ] ) ) ?
escapeshellcmd( rawurldecode( $_GET["l"] ) ) : NULL;
$vlabel = isset($_GET["vl"]) ?
Apply by running: patch -p3 < load_now.patch in the directory.
Cheers,
Bernard
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general