Quoting Jesse Becker <[EMAIL PROTECTED]>:

> On Feb 11, 2008 6:16 PM, Bernard Li <[EMAIL PROTECTED]> wrote:
>> On 2/11/08, Jesse Becker <[EMAIL PROTECTED]> wrote:
>>
>> > There are two issues here:  the immediate problem with clean_float not
>> > working correctly, and a more general input validiation problem.
>>
>> We need clean_int() to fix the bug where the "Show Hosts" radio button
>> stopped working.  Well, perhaps clean_int() is an overkill, it just
>> needs to check whether the _$GET["sh"] variable is 0 or 1.
>
> Sure--that's a good example.  It's usually better to have several
> "tools" like this, instead of going at it piecemeal for each variable.

Hello.

A clean_int() function would allow $showhosts to be 2, 3, 4, etc.  
which are also bad values.  Not likely to be harmful, but still bogus.

Since $showhosts has only 2 legitimate values, what about filtering it  
as a boolean, and casting it to int when needed, like in  
cluster_view.php?

alex

-------------------------------------------------------------------------
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-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to