Hi guys:
On Mon, Apr 7, 2008 at 5:05 PM, Brad Nicholes <[EMAIL PROTECTED]> wrote:
> Looks harmless enough to me. +1
Seems that the fix is a bit more involved. I have already fixed this
in trunk, and the following is the backported patch:
Index: web/get_context.php
===================================================================
--- web/get_context.php (revision 1139)
+++ web/get_context.php (working copy)
@@ -43,14 +43,19 @@
escapeshellcmd($_GET["z"]) : NULL;
# A stack of grid parents. Prefer a GET variable, default to cookie.
if (isset($_GET["gs"]) and $_GET["gs"])
- $gridstack = explode(":", clean_string( rawurldecode($_GET["gs"] ) ) );
-else
- $gridstack = explode(":", clean_string( $_COOKIE["gs"] ) );
+ $gridstack = explode( ">", rawurldecode( $_GET["gs"] ) );
+else if ( isset($_COOKIE['gs']) and $_COOKIE['gs'])
+ $gridstack = explode( ">", $_COOKIE["gs"] );
+if (isset($gridstack) and $gridstack) {
+ foreach( $gridstack as $key=>$value )
+ $gridstack[ $key ] = clean_string( $value );
+}
+
# Assume we are the first grid visited in the tree if there are no
CGI variables,
# or gridstack is not well formed. Gridstack always has at least one element.
-if (!count($_GET) or !strstr($gridstack[0], "http://"))
- $initgrid=TRUE;
+if ( !count($_GET) or !isset($gridstack) or !strstr($gridstack[0], "http://"))
+ $initgrid=TRUE;
# Default values
if (!is_numeric($hostcols)) $hostcols = 4;
Index: web/header.php
===================================================================
--- web/header.php (revision 1139)
+++ web/header.php (working copy)
@@ -46,15 +46,14 @@
array_pop($gridstack);
}
}
-$gridstack_str = join(":", $gridstack);
+$gridstack_str = join(">", $gridstack);
$gridstack_url = rawurlencode($gridstack_str);
if ($initgrid or $gridwalk)
{
# Use cookie so we dont have to pass gridstack around within this site.
# Cookie values are automatically urlencoded. Expires in a day.
- $gscookie = $_COOKIE["gs"];
- if (! isset($gscookie))
+ if ( !isset($_COOKIE["gs"]) or $_COOKIE["gs"] != $gridstack_str )
setcookie("gs", $gridstack_str, time() + 86400);
}
This patch includes changes from revisions 1187, 1188, 1217 and 1225 from trunk.
Since the patch has been modified, I guess we need to re-vote.
Thanks,
Bernard
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers