Package: acidbase
Version: 1.2.1-1
Severity: important


Hello,
I believe that your last debian security patch broke searching and graph plotting in acidbase:

error in search:
when searching results shows "Displaying alerts -49-0 of 1 total"

i thing that it has something to do with clean variable because if i try
to search for "WEB-MISC" signatures in DB results are in fact searched for "WEBMISC" (missing "-") ....

error in graph:
when trying to make a graph from data, there is no picture rendered, with error messages:

------------- ERR MESSAGES --------------
Warning: ereg_replace(): REG_EBRACK in /usr/share/acidbase/includes/base_state_common.inc.php on line 167

... (10 times )

Warning: ereg_replace(): REG_EBRACK in /usr/share/acidbase/includes/base_state_common.inc.php on line 167

Warning: imagecreatetruecolor(): Invalid image dimensions in /usr/share/php/Image/Canvas/GD.php on line 159

Warning: imagealphablending(): supplied argument is not a valid Image resource in /usr/share/php/Image/Canvas/GD.php on line 161

Warning: imagecolorallocate(): supplied argument is not a valid Image resource in /usr/share/php/Image/Canvas/Color.php on line 65

Warning: imagefilledrectangle(): supplied argument is not a valid Image resource in /usr/share/php/Image/Canvas/GD.php on line 1089

Warning: imagesetthickness(): supplied argument is not a valid Image resource in /usr/share/php/Image/Canvas/GD.php on line 236

Warning: imagesetthickness(): supplied argument is not a valid Image resource in /usr/share/php/Image/Canvas/GD.php on line 1585

Warning: factory(Image/Graph/.php): failed to open stream: No such file or directory in /usr/share/php/Image/Graph.php on line 445

Warning: factory(): Failed opening 'Image/Graph/.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/php/Image/Graph.php on line 445

Fatal error: Cannot instantiate non-existent class: image_graph_ in /usr/share/php/Image/Graph.php on line 565
------------- ERR MESSAGES --------------

i'm using
php:             4.3.10-16
libphp-jpgraph:  1.5.2-10
libphp-adodb:    4.64-4
php-image-graph: 0.7.1-1

I'm not a php guru, but i thing that you made a mistake in function CleanVariable. Down there comes a patch for graph plotting bug, but i don't know how to fix that search problem. (Also there is dependency on PEAR package which is not in debian but it is not a bug at all - PEAR: Image_Color)

Sincerely Radoslav 'bodik' Bodo


---------- PATCH CUT ------------------
--- base_state_common.inc.php   2005-11-02 22:30:34.000000000 +0100
+++ base_state_common.inc.php.bodik     2005-11-07 16:47:44.000000000 +0100
@@ -108,6 +108,7 @@
  ************************************************************************/
 function CleanVariable($item, $valid_data, $exception = "")
 {
+
    /* Check the exception value list first */
    if ( $exception != "" )
    {
@@ -122,46 +123,46 @@

    $regex_mask = "";

-   if ( ($valid_data & VAR_DIGIT) > 0 )
+   if ( ($valid_data && VAR_DIGIT) > 0 )
       $regex_mask = $regex_mask . "0-9";

-   if ( ($valid_data & VAR_LETTER) > 0 )
+   if ( ($valid_data && VAR_LETTER) > 0 )
       $regex_mask = $regex_mask . "A-Za-z";

-   if ( ($valid_data & VAR_ULETTER) > 0 )
+   if ( ($valid_data && VAR_ULETTER) > 0 )
       $regex_mask = $regex_mask . "A-Z";

-   if ( ($valid_data & VAR_LLETTER) > 0 )
+   if ( ($valid_data && VAR_LLETTER) > 0 )
       $regex_mask = $regex_mask . "a-z";

-   if ( ($valid_data & VAR_ALPHA) > 0 )
+   if ( ($valid_data && VAR_ALPHA) > 0 )
       $regex_mask = $regex_mask . "0-9A-Za-z";

-   if ( ($valid_data & VAR_SPACE) > 0 )
+   if ( ($valid_data && VAR_SPACE) > 0 )
       $regex_mask = $regex_mask . "\ ";

-   if ( ($valid_data & VAR_PERIOD) > 0 )
+   if ( ($valid_data && VAR_PERIOD) > 0 )
       $regex_mask = $regex_mask . "\.";

-   if ( ($valid_data & VAR_OPAREN) > 0 )
+   if ( ($valid_data && VAR_OPAREN) > 0 )
       $regex_mask = $regex_mask . "\(";

-   if ( ($valid_data & VAR_CPAREN) > 0 )
+   if ( ($valid_data && VAR_CPAREN) > 0 )
       $regex_mask = $regex_mask . "\)";

-   if ( ($valid_data & VAR_BOOLEAN) > 0 )
+   if ( ($valid_data && VAR_BOOLEAN) > 0 )
       $regex_mask = $regex_mask . "\)";

-   if ( ($valid_data & VAR_OPERATOR) > 0 )
+   if ( ($valid_data && VAR_OPERATOR) > 0 )
       $regex_mask = $regex_mask . "\)";

-   if ( ($valid_data & VAR_PUNC) > 0 )
+   if ( ($valid_data && VAR_PUNC) > 0 )
       $regex_mask = $regex_mask . "\!\#\$\%\^\&\*\_\-\=\+\:\;\,\?\ \(\))";

-   if ( ($valid_data & VAR_USCORE) > 0 )
+   if ( ($valid_data && VAR_USCORE) > 0 )
       $regex_mask = $regex_mask . "\_";

-   if ( ($valid_data & VAR_AT) > 0 )
+   if ( ($valid_data && VAR_AT) > 0 )
       $regex_mask = $regex_mask . "\@";

    return ereg_replace("[^".$regex_mask."]", "", $item);

---------- PATCH CUT ------------------




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to