derick Tue Jan 31 18:51:49 2006 UTC
Modified files:
/pecl/filter filter.c logical_filters.c package.xml
/pecl/filter/tests 013.phpt
Log:
- Fixed PECL bug #6639: uppercase hexadecimal digits are not supported.
http://cvs.php.net/viewcvs.cgi/pecl/filter/filter.c?r1=1.35&r2=1.36&diff_format=u
Index: pecl/filter/filter.c
diff -u pecl/filter/filter.c:1.35 pecl/filter/filter.c:1.36
--- pecl/filter/filter.c:1.35 Mon Jan 23 09:04:50 2006
+++ pecl/filter/filter.c Tue Jan 31 18:51:49 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.35 2006/01/23 09:04:50 derick Exp $ */
+/* $Id: filter.c,v 1.36 2006/01/31 18:51:49 derick Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -98,7 +98,7 @@
NULL,
PHP_RSHUTDOWN(filter),
PHP_MINFO(filter),
- "0.9.4",
+ "0.9.5-dev",
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -265,7 +265,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.35 $");
+ php_info_print_table_row( 2, "Revision", "$Revision: 1.36 $");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
http://cvs.php.net/viewcvs.cgi/pecl/filter/logical_filters.c?r1=1.19&r2=1.20&diff_format=u
Index: pecl/filter/logical_filters.c
diff -u pecl/filter/logical_filters.c:1.19 pecl/filter/logical_filters.c:1.20
--- pecl/filter/logical_filters.c:1.19 Sat Jan 14 15:10:54 2006
+++ pecl/filter/logical_filters.c Tue Jan 31 18:51:49 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: logical_filters.c,v 1.19 2006/01/14 15:10:54 sniper Exp $ */
+/* $Id: logical_filters.c,v 1.20 2006/01/31 18:51:49 derick Exp $ */
#include "php_filter.h"
#include "filter_private.h"
@@ -123,7 +123,7 @@
goto stateI1;
}
p++;
- if (*p == 'x') {
+ if (*p == 'x' || *p == 'X') {
if (allow_hex) {
p++;
goto stateH1;
@@ -148,7 +148,7 @@
stateH1: /* state "hex 1" */
ctx_type = TYPE_HEX;
- if ((*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f')) {
+ if ((*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || (*p >= 'A'
&& *p <= 'F')) {
ctx_value *= 16;
if (*p >= '0' && *p <= '9') {
ctx_value += ((*p) - '0');
@@ -156,6 +156,9 @@
if (*p >= 'a' && *p <= 'f') {
ctx_value += 10 + ((*p) - 'a');
}
+ if (*p >= 'A' && *p <= 'F') {
+ ctx_value += 10 + ((*p) - 'A');
+ }
p++;
goto stateH1;
} else {
http://cvs.php.net/viewcvs.cgi/pecl/filter/package.xml?r1=1.6&r2=1.7&diff_format=u
Index: pecl/filter/package.xml
diff -u pecl/filter/package.xml:1.6 pecl/filter/package.xml:1.7
--- pecl/filter/package.xml:1.6 Mon Jan 23 09:04:50 2006
+++ pecl/filter/package.xml Tue Jan 31 18:51:49 2006
@@ -24,12 +24,10 @@
<license>PHP</license>
<release>
<state>beta</state>
- <version>0.9.4</version>
- <date>2006-01-23</date>
+ <version>0.9.5</version>
+ <date>2006-02-??</date>
<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
+- Fixed PECL bug #6639: uppercase hexadecimal digits are not supported.
</notes>
<filelist>
<file role="src" name="config.m4"/>
http://cvs.php.net/viewcvs.cgi/pecl/filter/tests/013.phpt?r1=1.3&r2=1.4&diff_format=u
Index: pecl/filter/tests/013.phpt
diff -u pecl/filter/tests/013.phpt:1.3 pecl/filter/tests/013.phpt:1.4
--- pecl/filter/tests/013.phpt:1.3 Sat Jan 21 15:57:43 2006
+++ pecl/filter/tests/013.phpt Tue Jan 31 18:51:49 2006
@@ -4,6 +4,9 @@
<?php
var_dump(filter_data("0xff", FILTER_VALIDATE_INT,
array("flags"=>FILTER_FLAG_ALLOW_HEX)));
+var_dump(filter_data("0Xff", FILTER_VALIDATE_INT,
array("flags"=>FILTER_FLAG_ALLOW_HEX)));
+var_dump(filter_data("0xFF", FILTER_VALIDATE_INT,
array("flags"=>FILTER_FLAG_ALLOW_HEX)));
+var_dump(filter_data("0XFF", FILTER_VALIDATE_INT,
array("flags"=>FILTER_FLAG_ALLOW_HEX)));
var_dump(filter_data("07", FILTER_VALIDATE_INT,
array("flags"=>FILTER_FLAG_ALLOW_OCTAL)));
var_dump(filter_data("0xff0000", FILTER_VALIDATE_INT,
array("flags"=>FILTER_FLAG_ALLOW_HEX)));
var_dump(filter_data("0666", FILTER_VALIDATE_INT,
array("flags"=>FILTER_FLAG_ALLOW_OCTAL)));
@@ -24,6 +27,9 @@
?>
--EXPECT--
int(255)
+int(255)
+int(255)
+int(255)
int(7)
int(16711680)
int(438)
|