pajoye          Thu Aug 31 22:34:32 2006 UTC

  Removed files:               (Branch: PHP_5_2)
    /php-src/ext/filter package2.xml 

  Modified files:              
    /php-src/ext/filter CREDITS filter.c filter_private.h package.xml 
    /php-src/ext/filter/tests   035.phpt 
  Log:
  - MFH
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/CREDITS?r1=1.1&r2=1.1.2.1&diff_format=u
Index: php-src/ext/filter/CREDITS
diff -u php-src/ext/filter/CREDITS:1.1 php-src/ext/filter/CREDITS:1.1.2.1
--- php-src/ext/filter/CREDITS:1.1      Tue Sep  6 18:46:37 2005
+++ php-src/ext/filter/CREDITS  Thu Aug 31 22:34:32 2006
@@ -1,2 +1,2 @@
 Input Filter
-Rasmus Lerdorf, Derick Rethans
+Rasmus Lerdorf, Derick Rethans, Pierre-Alain Joye
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.13&r2=1.52.2.14&diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.52.2.13 
php-src/ext/filter/filter.c:1.52.2.14
--- php-src/ext/filter/filter.c:1.52.2.13       Thu Aug 31 22:12:10 2006
+++ php-src/ext/filter/filter.c Thu Aug 31 22:34:32 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: filter.c,v 1.52.2.13 2006/08/31 22:12:10 tony2001 Exp $ */
+/* $Id: filter.c,v 1.52.2.14 2006/08/31 22:34:32 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -274,7 +274,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_row( 2, "Input Validation and Filtering", 
"enabled" );
-       php_info_print_table_row( 2, "Revision", "$Revision: 1.52.2.13 $");
+       php_info_print_table_row( 2, "Revision", "$Revision: 1.52.2.14 $");
        php_info_print_table_end();
 
        DISPLAY_INI_ENTRIES();
@@ -621,7 +621,29 @@
        }
 
        if (found) {
+               zval **option;
+
+               if (options && filter_flags==0 &&
+                               zend_hash_find(HASH_OF(options), "flags", 
sizeof("flags"), (void **)&option) == SUCCESS) {
+                       switch (Z_TYPE_PP(option)) {
+                               case IS_ARRAY:
+                               break;
+                               default:
+                               convert_to_long(*option);
+                               filter_flags = Z_LVAL_PP(option);
+                               break;
+                       }
+               } else {
+                       filter_flags = FILTER_FLAG_SCALAR;
+               }
+
                zval_copy_ctor(return_value);  /* Watch out for empty strings */
+
+               if (Z_TYPE_P(return_value) == IS_ARRAY && !(filter_flags & 
FILTER_FLAG_ARRAY)) {
+                       zval_dtor(return_value);
+                       ZVAL_BOOL(return_value, 0);
+               }
+
                php_zval_filter_recursive(&return_value, filter, filter_flags, 
options, charset TSRMLS_CC);
        } else {
                RETURN_NULL();
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter_private.h?r1=1.12.2.1&r2=1.12.2.2&diff_format=u
Index: php-src/ext/filter/filter_private.h
diff -u php-src/ext/filter/filter_private.h:1.12.2.1 
php-src/ext/filter/filter_private.h:1.12.2.2
--- php-src/ext/filter/filter_private.h:1.12.2.1        Thu Aug 31 15:50:56 2006
+++ php-src/ext/filter/filter_private.h Thu Aug 31 22:34:32 2006
@@ -16,15 +16,15 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: filter_private.h,v 1.12.2.1 2006/08/31 15:50:56 pajoye Exp $ */
+/* $Id: filter_private.h,v 1.12.2.2 2006/08/31 22:34:32 pajoye Exp $ */
 
 #ifndef FILTER_PRIVATE_H
 #define FILTER_PRIVATE_H
 
 #define FILTER_FLAG_NONE                    0x0000
 
-#define FILTER_FLAG_ARRAY                              0x1000000
-#define FILTER_FLAG_SCALAR                         0x2000000
+#define FILTER_FLAG_ARRAY                   0x1000000
+#define FILTER_FLAG_SCALAR                           0x2000000
 
 #define FILTER_FLAG_ALLOW_OCTAL             0x0001
 #define FILTER_FLAG_ALLOW_HEX               0x0002
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/package.xml?r1=1.22.2.1&r2=1.22.2.2&diff_format=u
Index: php-src/ext/filter/package.xml
diff -u php-src/ext/filter/package.xml:1.22.2.1 
php-src/ext/filter/package.xml:1.22.2.2
--- php-src/ext/filter/package.xml:1.22.2.1     Sat Jul 29 01:26:55 2006
+++ php-src/ext/filter/package.xml      Thu Aug 31 22:34:32 2006
@@ -1,58 +1,71 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE package SYSTEM "../pear/package.dtd">
-<package>
+<?xml version="1.0" encoding="UTF-8"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0"; 
xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; packagerversion="1.4.6" 
version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 
http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 
http://pear.php.net/dtd/package-2.0.xsd";>
   <name>filter</name>
+  <channel>pecl.php.net</channel>
   <summary>Extension for safely dealing with input parameters</summary>
-  <maintainers>
-    <maintainer>
-      <user>derick</user>
-      <name>Derick Rethans</name>
-      <email>[EMAIL PROTECTED]</email>
-      <role>lead</role>
-    </maintainer>
-    <maintainer>
-      <user>rasmus</user>
-      <name>Rasmus Lerdorf</name>
-      <email>[EMAIL PROTECTED]</email>
-      <role>lead</role>
-    </maintainer>
-  </maintainers>
-  <description>
-The Input Filter extension is meant to address this issue by implementing a set
+  <description>The Input Filter extension is meant to address this issue by 
implementing a set
 of filters and mechanisms that users can use to safely access their input data.
+ 
  </description>
-  <license>PHP</license>
-  <release>
-    <state>beta</state>
-    <version>0.10.0</version>
-    <date>2006-05-14</date>
-    <notes>- Fixed PECL bug #8315, NULL character stops the validation (Pierre)
+  <lead>
+    <name>Pierre-Alain Joye</name>
+    <user>pajoye</user>
+    <email>[EMAIL PROTECTED]</email>
+    <active>yes</active>
+  </lead>
+  <lead>
+    <name>Derick Rethans</name>
+    <user>derick</user>
+    <email>[EMAIL PROTECTED]</email>
+    <active>yes</active>
+  </lead>
+  <lead>
+    <name>Rasmus Lerdorf</name>
+    <user>rasmus</user>
+    <email>[EMAIL PROTECTED]</email>
+    <active>yes</active>
+  </lead>
+  <date>2006-01-09</date>
+  <version>
+    <release>0.10.0</release>
+    <api>0.10.0</api>
+  </version>
+  <stability>
+    <release>beta</release>
+    <api>alpha</api>
+  </stability>
+  <license uri="http://www.php.net/license";>PHP</license>
+  <notes>- Fixed PECL bug #6136, ini_set should not be able to change the 
filter.default (Pierre)
+- Fixed PECL bug #6639: uppercase hexadecimal digits are not supported
 - Fixed PECL bug #7733, Float exponential weird result (Pierre)
 - Fixed PECL bug #7715, Input_get float error (Pierre)
-- Fixed PECL bug #6639: uppercase hexadecimal digits are not supported
-- Fixed PECL bug #6136, ini_set should not be able to change the 
filter.default (Pierre)
+- Fixed PECL bug #8316, empty string with FILTER_VALIDATE_INT returns 0
+- Fixed Possible leak in internal sapi_filter (Pierre)
+- Fixed an issue with multiple calls using the same input type (Tony)
+- Fixed leak in sapi filter (Tony, Ilia)
+- Fixed magic_quotes_gpc from being applied when RAW filter is used (Ilia)
 - Implemented PECL req #6641: negative values for hexadecimal and octal 
numbers are not supported.
+- Added support for custom decimal separator (Pierre)
 - Added support for php pcre expressions (Pierre)
-- Fixed Possible leak in internal sapi_filter (Pierre)
 - Added input_get_args, fetches all input in one call (Pierre)
-- Added FILTER_FLAG_SCALAR and FILTER_FLAG_ARRAY , allows or not array values 
(Pierre)
+- Added FILTER_FLAG_SCALAR and FILTER_FLAG_ARRAY, allows or not array values 
(Pierre)
 - Basic IPv6 (no option yet, only the syntax is verified) (Pierre)
-- Add support for custom decimal separator (Pierre)
-- INT and Float filters trim the values before the validations (spaces only) 
(Pierre)
+- INT, Float and boolean filters trim the values before the validations 
(default trim()) (Pierre)
 - input_get and input_get_args returns now FALSE when the validation failed
   and NULL when the variable has not been found (Pierre)
 - Added JIT support
-  </notes>
-    <filelist>
-      <file role="src" name="config.m4"/>
-      <file role="src" name="config.w32"/>
-      <file role="src" name="filter.c"/>
-      <file role="src" name="filter_private.h"/>
-      <file role="src" name="callback_filter.c"/>
-      <file role="src" name="logical_filters.c"/>
-      <file role="src" name="sanitizing_filters.c"/>
-      <file role="src" name="php_filter.h"/>
-      <file role="doc" name="CREDITS"/>
+ </notes>
+  <contents>
+    <dir name="/">
+      <file name="callback_filter.c" role="src"/>
+      <file name="config.m4" role="src"/>
+      <file name="config.w32" role="src"/>
+      <file name="CREDITS" role="doc"/>
+      <file name="filter.c" role="src"/>
+      <file name="filter_private.h" role="src"/>
+      <file name="logical_filters.c" role="src"/>
+      <file name="php_filter.h" role="src"/>
+      <file name="sanitizing_filters.c" role="src"/>
       <dir name="tests">
         <file role="test" name="001.phpt"/>
         <file role="test" name="002.phpt"/>
@@ -88,12 +101,36 @@
         <file role="test" name="032.phpt"/>
         <file role="test" name="bug7586.phpt"/>
       </dir>
-    </filelist>
-    <deps>
-      <dep type="php" rel="ge" version="5.0.0"/>
-    </deps>
-  </release>
+    </dir>
+<!-- / -->
+  </contents>
+  <dependencies>
+    <required>
+      <php>
+        <min>5.0.0</min>
+      </php>
+      <pearinstaller>
+        <min>1.4.0b1</min>
+      </pearinstaller>
+    </required>
+  </dependencies>
+  <providesextension>filter</providesextension>
+  <extsrcrelease/>
+  <changelog>
+    <release>
+      <date>2006-01-23</date>
+      <time>10:04:15</time>
+      <version>
+        <release>0.9.4</release>
+        <api>0.9.4</api>
+      </version>
+      <stability>
+        <release>beta</release>
+        <api>beta</api>
+      </stability>
+      <notes>- Reimplement php_filter_callback() as exception-safe and without 
memleaks
+- Renamed all constants.
+- Fixed PECL bug #6124: Crash on HTML tags when using FS_STRING</notes>
+    </release>
+  </changelog>
 </package>
-<!--
-vim:et:ts=1:sw=1
--->
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/tests/035.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/filter/tests/035.phpt
diff -u php-src/ext/filter/tests/035.phpt:1.1.2.2 
php-src/ext/filter/tests/035.phpt:1.1.2.3
--- php-src/ext/filter/tests/035.phpt:1.1.2.2   Thu Aug 31 22:17:44 2006
+++ php-src/ext/filter/tests/035.phpt   Thu Aug 31 22:34:32 2006
@@ -12,10 +12,10 @@
 $ret = input_get(INPUT_GET, 'a', FILTER_VALIDATE_INT, 
array('flags'=>FILTER_FLAG_ALLOW_OCTAL));
 var_dump($ret);
 
-$ret = input_get(INPUT_GET, 'ar', FILTER_VALIDATE_INT);
+$ret = input_get(INPUT_GET, 'ar', FILTER_VALIDATE_INT, 
array('flags'=>FILTER_FLAG_ARRAY));
 var_dump($ret);
 
-$ret = input_get(INPUT_GET, 'ar', FILTER_VALIDATE_INT, 
array('flags'=>FILTER_FLAG_ALLOW_OCTAL));
+$ret = input_get(INPUT_GET, 'ar', FILTER_VALIDATE_INT, 
array('flags'=>FILTER_FLAG_ALLOW_OCTAL|FILTER_FLAG_ARRAY));
 var_dump($ret);
 
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to