[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Thu Aug 23 01:31:11 2007 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2785r2=1.2786diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2785 php-src/ChangeLog:1.2786 --- php-src/ChangeLog:1.2785Wed Aug 22 01:31:21 2007 +++ php-src/ChangeLog Thu Aug 23 01:31:10 2007 @@ -1,3 +1,67 @@ +2007-08-22 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ext/pgsql/pgsql.c: + + Fixed bug #42368 (Incorrect error message displayed by pg_escape_string). + +2007-08-22 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ext/standard/dir.c: + MFH:- Fixed bug #42365 (glob() crashes with invalid flags) + +* ext/standard/dir.c: + - Fixed bug #42365 (glob() crashes with invalid flags) + +2007-08-22 Dmitry Stogov [EMAIL PROTECTED] + +* ext/soap/tests/bugs/bug42183.phpt + ext/soap/tests/bugs/bug42183.phpt: + + file bug42183.phpt was initially added on branch PHP_5_2. + +* (PHP_5_2) + NEWS + ext/soap/php_encoding.c + ext/soap/php_encoding.c + ext/soap/tests/bugs/bug42183.phpt: + Fixed bug #42183 (classmap cause crashr in non-wsdl mode) + +* (PHP_5_2) + NEWS + ZendEngine2/zend_builtin_functions.c + ZendEngine2/zend_builtin_functions.c + ZendEngine2/tests/is_a.phpt + ZendEngine2/tests/is_a.phpt: + Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, in + the same way as instanceof operator). + +* ZendEngine2/zend_compile.c + ZendEngine2/zend_execute_API.c + ZendEngine2/zend_vm_def.h + ZendEngine2/zend_vm_execute.h + ZendEngine2/tests/ns_021.phpt + ZendEngine2/tests/ns_026.phpt: + Fixed name resolution +namespace A; + B::foo(); // 1. this is function foo from namespace B +// 2. this is static method foo of class B from + namespace A +// 3. this is static methos boo of internal class B +namespace A; + A::foo(); // 1. this is function foo from namespace A +// 2. this is static method foo of class A from + namespace A +// 3. this is static methos foo of internal class A + +* ZendEngine2/zend_compile.c + ZendEngine2/tests/ns_029.phpt + ZendEngine2/tests/ns_030.phpt: + typo + 2007-08-21 Ilia Alshanetsky [EMAIL PROTECTED] * ext/pgsql/pgsql.c:
[PHP-CVS] cvs: CVSROOT / avail
pajoye Wed Aug 22 13:25:51 2007 UTC Modified files: /CVSROOTavail Log: - intl karma http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1299r2=1.1300diff_format=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.1299 CVSROOT/avail:1.1300 --- CVSROOT/avail:1.1299Mon Aug 20 07:58:07 2007 +++ CVSROOT/avail Wed Aug 22 13:25:50 2007 @@ -282,6 +282,8 @@ avail|tias|pear/PEAR_Frontend_Web,peardoc avail|va|pecl/yami avail|msaraujo,mansion|pecl/lua +avail|merletenney,kirtig,harveyrd|pecl/intl + # php windows installer avail|jmertic|php-src/win32/installer -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/soap php_encoding.c /ext/soap/tests/bugs bug42183.phpt
dmitry Wed Aug 22 14:18:11 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/soap/tests/bugsbug42183.phpt Modified files: /php-srcNEWS /php-src/ext/soap php_encoding.c Log: Fixed bug #42183 (classmap cause crashr in non-wsdl mode) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.903r2=1.2027.2.547.2.904diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.903 php-src/NEWS:1.2027.2.547.2.904 --- php-src/NEWS:1.2027.2.547.2.903 Wed Aug 22 13:19:47 2007 +++ php-src/NEWSWed Aug 22 14:18:09 2007 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? Aug 2007, PHP 5.2.4 +- Fixed bug #42183 (classmap cause crashr in non-wsdl mode). (Dmitry) - Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, in the same way as instanceof operator). (Dmitry) - Fixed bug #41904 (proc_open(): empty env array should cause empty http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.34r2=1.103.2.21.2.35diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.34 php-src/ext/soap/php_encoding.c:1.103.2.21.2.35 --- php-src/ext/soap/php_encoding.c:1.103.2.21.2.34 Thu Jun 14 07:09:31 2007 +++ php-src/ext/soap/php_encoding.c Wed Aug 22 14:18:09 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.103.2.21.2.34 2007/06/14 07:09:31 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.21.2.35 2007/08/22 14:18:09 dmitry Exp $ */ #include time.h @@ -447,7 +447,10 @@ zend_hash_get_current_key_ex(SOAP_GLOBAL(class_map), type_name, type_len, idx, 0, pos) == HASH_KEY_IS_STRING) { /* TODO: namespace isn't stored */ - encodePtr enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)-target_ns, type_name); + encodePtr enc = NULL; + if (SOAP_GLOBAL(sdl)) { + enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)-target_ns, type_name); + } if (enc) { encode = enc; } else if (SOAP_GLOBAL(sdl)) { http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug42183.phpt?view=markuprev=1.1 Index: php-src/ext/soap/tests/bugs/bug42183.phpt +++ php-src/ext/soap/tests/bugs/bug42183.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap php_encoding.c /ext/soap/tests/bugs bug42183.phpt
dmitry Wed Aug 22 14:18:29 2007 UTC Modified files: /php-src/ext/soap php_encoding.c /php-src/ext/soap/tests/bugsbug42183.phpt Log: Fixed bug #42183 (classmap cause crashr in non-wsdl mode) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.160r2=1.161diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.160 php-src/ext/soap/php_encoding.c:1.161 --- php-src/ext/soap/php_encoding.c:1.160 Thu Jun 14 07:09:42 2007 +++ php-src/ext/soap/php_encoding.c Wed Aug 22 14:18:28 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.160 2007/06/14 07:09:42 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.161 2007/08/22 14:18:28 dmitry Exp $ */ #include time.h @@ -470,12 +470,14 @@ zend_uchar utype = zend_hash_get_current_key_ex(SOAP_GLOBAL(class_map), type_name, type_len, idx, 0, pos); if (utype == HASH_KEY_IS_STRING || utype == HASH_KEY_IS_UNICODE) { - encodePtr enc; + encodePtr enc = NULL; type_name.s = soap_encode_string_ex(utype, type_name, type_len TSRMLS_CC); /* TODO: namespace isn't stored */ - enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)-target_ns, type_name.s); + if (SOAP_GLOBAL(sdl)) { + enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)-target_ns, type_name.s); + } if (enc) { encode = enc; } else if (SOAP_GLOBAL(sdl)) { http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug42183.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/soap/tests/bugs/bug42183.phpt diff -u /dev/null php-src/ext/soap/tests/bugs/bug42183.phpt:1.2 --- /dev/null Wed Aug 22 14:18:29 2007 +++ php-src/ext/soap/tests/bugs/bug42183.phpt Wed Aug 22 14:18:28 2007 @@ -0,0 +1,27 @@ +--TEST-- +Bug #42183 (classmap cause crash in non-wsdl mode ) +--SKIPIF-- +?php require_once('skipif.inc'); ? +--FILE-- +?php +class PHPObject { +} + +$req = EOF +?xml version=1.0 encoding=UTF-8? +SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:ns1=http://ws.sit.com; SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;SOAP-ENV:Bodyns1:test//SOAP-ENV:Body/SOAP-ENV:Envelope +EOF; + +function test() { + return new PHPObject(); +} + +$server = new SoapServer(NULL, array('uri' = 'http://ws.sit.com', + 'classmap' = array('Object' = 'PHPObject'))); +$server-addFunction(test); +ob_start(); +$server-handle($req); +ob_end_clean(); +echo ok\n; +--EXPECT-- +ok -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard dir.c
janiWed Aug 22 14:58:30 2007 UTC Modified files: /php-src/ext/standard dir.c Log: - Fixed bug #42365 (glob() crashes with invalid flags) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.167r2=1.168diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.167 php-src/ext/standard/dir.c:1.168 --- php-src/ext/standard/dir.c:1.167Mon Jul 16 20:29:37 2007 +++ php-src/ext/standard/dir.c Wed Aug 22 14:58:30 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.167 2007/07/16 20:29:37 tony2001 Exp $ */ +/* $Id: dir.c,v 1.168 2007/08/22 14:58:30 jani Exp $ */ /* {{{ includes/startup/misc */ @@ -141,34 +141,56 @@ REGISTER_STRING_CONSTANT(PATH_SEPARATOR, pathsep_str, CONST_CS|CONST_PERSISTENT); #ifdef HAVE_GLOB + #ifdef GLOB_BRACE REGISTER_LONG_CONSTANT(GLOB_BRACE, GLOB_BRACE, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_BRACE 0 #endif + #ifdef GLOB_MARK REGISTER_LONG_CONSTANT(GLOB_MARK, GLOB_MARK, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_MARK 0 #endif + #ifdef GLOB_NOSORT REGISTER_LONG_CONSTANT(GLOB_NOSORT, GLOB_NOSORT, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_NOSORT 0 #endif + #ifdef GLOB_NOCHECK REGISTER_LONG_CONSTANT(GLOB_NOCHECK, GLOB_NOCHECK, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_NOCHECK 0 #endif + #ifdef GLOB_NOESCAPE REGISTER_LONG_CONSTANT(GLOB_NOESCAPE, GLOB_NOESCAPE, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_NOESCAPE 0 #endif + #ifdef GLOB_ERR REGISTER_LONG_CONSTANT(GLOB_ERR, GLOB_ERR, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_ERR 0 #endif #ifndef GLOB_ONLYDIR -#define GLOB_ONLYDIR (130) -#define GLOB_EMULATE_ONLYDIR -#define GLOB_FLAGMASK (~GLOB_ONLYDIR) +# define GLOB_ONLYDIR (130) +# define GLOB_EMULATE_ONLYDIR +# define GLOB_FLAGMASK (~GLOB_ONLYDIR) #else -#define GLOB_FLAGMASK (~0) +# define GLOB_FLAGMASK (~0) #endif +/* This is used for checking validity of passed flags (passing invalid flags causes segfault in glob()!! */ +#define GLOB_AVAILABLE_FLAGS (0 | GLOB_BRACE | GLOB_MARK | GLOB_NOSORT | GLOB_NOCHECK | GLOB_NOESCAPE | GLOB_ERR | GLOB_ONLYDIR) + REGISTER_LONG_CONSTANT(GLOB_ONLYDIR, GLOB_ONLYDIR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(GLOB_AVAILABLE_FLAGS, GLOB_AVAILABLE_FLAGS, CONST_CS | CONST_PERSISTENT); #endif /* HAVE_GLOB */ @@ -405,6 +427,11 @@ return; } + if ((GLOB_AVAILABLE_FLAGS flags) != flags) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, At least one of the passed flags is invalid or not supported on this platform); + RETURN_FALSE; + } + #ifdef ZTS if (!IS_ABSOLUTE_PATH(pattern, pattern_len)) { result = VCWD_GETCWD(cwd, MAXPATHLEN); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard dir.c
janiWed Aug 22 14:59:45 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard dir.c /php-srcNEWS Log: MFH:- Fixed bug #42365 (glob() crashes with invalid flags) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.147.2.3.2.9r2=1.147.2.3.2.10diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.147.2.3.2.9 php-src/ext/standard/dir.c:1.147.2.3.2.10 --- php-src/ext/standard/dir.c:1.147.2.3.2.9Mon Jul 16 20:29:21 2007 +++ php-src/ext/standard/dir.c Wed Aug 22 14:59:44 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: dir.c,v 1.147.2.3.2.9 2007/07/16 20:29:21 tony2001 Exp $ */ +/* $Id: dir.c,v 1.147.2.3.2.10 2007/08/22 14:59:44 jani Exp $ */ /* {{{ includes/startup/misc */ @@ -141,34 +141,56 @@ REGISTER_STRING_CONSTANT(PATH_SEPARATOR, pathsep_str, CONST_CS|CONST_PERSISTENT); #ifdef HAVE_GLOB + #ifdef GLOB_BRACE REGISTER_LONG_CONSTANT(GLOB_BRACE, GLOB_BRACE, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_BRACE 0 #endif + #ifdef GLOB_MARK REGISTER_LONG_CONSTANT(GLOB_MARK, GLOB_MARK, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_MARK 0 #endif + #ifdef GLOB_NOSORT REGISTER_LONG_CONSTANT(GLOB_NOSORT, GLOB_NOSORT, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_NOSORT 0 #endif + #ifdef GLOB_NOCHECK REGISTER_LONG_CONSTANT(GLOB_NOCHECK, GLOB_NOCHECK, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_NOCHECK 0 #endif + #ifdef GLOB_NOESCAPE REGISTER_LONG_CONSTANT(GLOB_NOESCAPE, GLOB_NOESCAPE, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_NOESCAPE 0 #endif + #ifdef GLOB_ERR REGISTER_LONG_CONSTANT(GLOB_ERR, GLOB_ERR, CONST_CS | CONST_PERSISTENT); +#else +# define GLOB_ERR 0 #endif #ifndef GLOB_ONLYDIR -#define GLOB_ONLYDIR (130) -#define GLOB_EMULATE_ONLYDIR -#define GLOB_FLAGMASK (~GLOB_ONLYDIR) +# define GLOB_ONLYDIR (130) +# define GLOB_EMULATE_ONLYDIR +# define GLOB_FLAGMASK (~GLOB_ONLYDIR) #else -#define GLOB_FLAGMASK (~0) +# define GLOB_FLAGMASK (~0) #endif +/* This is used for checking validity of passed flags (passing invalid flags causes segfault in glob()!! */ +#define GLOB_AVAILABLE_FLAGS (0 | GLOB_BRACE | GLOB_MARK | GLOB_NOSORT | GLOB_NOCHECK | GLOB_NOESCAPE | GLOB_ERR | GLOB_ONLYDIR) + REGISTER_LONG_CONSTANT(GLOB_ONLYDIR, GLOB_ONLYDIR, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(GLOB_AVAILABLE_FLAGS, GLOB_AVAILABLE_FLAGS, CONST_CS | CONST_PERSISTENT); #endif /* HAVE_GLOB */ @@ -375,8 +397,14 @@ int n; int ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, pattern, pattern_len, flags) == FAILURE) + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, pattern, pattern_len, flags) == FAILURE) { return; + } + + if ((GLOB_AVAILABLE_FLAGS flags) != flags) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, At least one of the passed flags is invalid or not supported on this platform); + RETURN_FALSE; + } #ifdef ZTS if (!IS_ABSOLUTE_PATH(pattern, pattern_len)) { http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.904r2=1.2027.2.547.2.905diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.904 php-src/NEWS:1.2027.2.547.2.905 --- php-src/NEWS:1.2027.2.547.2.904 Wed Aug 22 14:18:09 2007 +++ php-src/NEWSWed Aug 22 14:59:45 2007 @@ -1,6 +1,7 @@ PHPNEWS ||| ?? Aug 2007, PHP 5.2.4 +- Fixed bug #42365 (glob() crashes and/or accepts way too many flags). (Jani) - Fixed bug #42183 (classmap cause crashr in non-wsdl mode). (Dmitry) - Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, in the same way as instanceof operator). (Dmitry) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/pgsql pgsql.c
iliaa Wed Aug 22 22:40:29 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/pgsql pgsql.c Log: Fixed bug #42368 (Incorrect error message displayed by pg_escape_string). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.905r2=1.2027.2.547.2.906diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.905 php-src/NEWS:1.2027.2.547.2.906 --- php-src/NEWS:1.2027.2.547.2.905 Wed Aug 22 14:59:45 2007 +++ php-src/NEWSWed Aug 22 22:40:29 2007 @@ -1,8 +1,10 @@ PHPNEWS ||| ?? Aug 2007, PHP 5.2.4 +- Fixed bug #42368 (Incorrect error message displayed by pg_escape_string). + (Ilia) - Fixed bug #42365 (glob() crashes and/or accepts way too many flags). (Jani) -- Fixed bug #42183 (classmap cause crashr in non-wsdl mode). (Dmitry) +- Fixed bug #42183 (classmap causes crash in non-wsdl mode). (Dmitry) - Fixed bug #42009 (is_a() and is_subclass_of() should NOT call autoload, in the same way as instanceof operator). (Dmitry) - Fixed bug #41904 (proc_open(): empty env array should cause empty http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.21r2=1.331.2.13.2.22diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.21 php-src/ext/pgsql/pgsql.c:1.331.2.13.2.22 --- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.21 Mon Jul 2 15:37:43 2007 +++ php-src/ext/pgsql/pgsql.c Wed Aug 22 22:40:29 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: pgsql.c,v 1.331.2.13.2.21 2007/07/02 15:37:43 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.331.2.13.2.22 2007/08/22 22:40:29 iliaa Exp $ */ #include stdlib.h @@ -3571,11 +3571,20 @@ int from_len; int id = -1; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, s, from, from_len) == SUCCESS) { - pgsql_link = NULL; - id = PGG(default_link); - } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, pgsql_link, from, from_len) == FAILURE) { - return; + switch (ZEND_NUM_ARGS()) { + case 1: + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, from, from_len) == FAILURE) { + return; + } + pgsql_link = NULL; + id = PGG(default_link); + break; + + default: + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, pgsql_link, from, from_len) == FAILURE) { + return; + } + break; } to = (char *) safe_emalloc(from_len, 2, 1); @@ -3604,11 +3613,20 @@ #endif zval *pgsql_link; - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, s, from, from_len) == SUCCESS) { - pgsql_link = NULL; - id = PGG(default_link); - } else if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, pgsql_link, from, from_len) == FAILURE) { - return; + switch (ZEND_NUM_ARGS()) { + case 1: + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, from, from_len) == FAILURE) { + return; + } + pgsql_link = NULL; + id = PGG(default_link); + break; + + default: + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, rs, pgsql_link, from, from_len) == FAILURE) { + return; + } + break; } #ifdef HAVE_PQESCAPE_BYTEA_CONN -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/session mod_files.c
iliaa Thu Aug 23 02:04:39 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/sessionmod_files.c Log: Fixed bug #37273 (Symlinks and mod_files session handler allow open_basedir bypass). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.906r2=1.2027.2.547.2.907diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.906 php-src/NEWS:1.2027.2.547.2.907 --- php-src/NEWS:1.2027.2.547.2.906 Wed Aug 22 22:40:29 2007 +++ php-src/NEWSThu Aug 23 02:04:39 2007 @@ -9,6 +9,8 @@ in the same way as instanceof operator). (Dmitry) - Fixed bug #41904 (proc_open(): empty env array should cause empty environment to be passed to process). (Jani) +- Fixed bug #37273 (Symlinks and mod_files session handler allow open_basedir + bypass). (Ilia) 16 Aug 2007, PHP 5.2.4RC2 - Fixed oci8 and PDO_OCI extensions to allow configuring with Oracle 11g client http://cvs.php.net/viewvc.cgi/php-src/ext/session/mod_files.c?r1=1.100.2.3.2.7r2=1.100.2.3.2.8diff_format=u Index: php-src/ext/session/mod_files.c diff -u php-src/ext/session/mod_files.c:1.100.2.3.2.7 php-src/ext/session/mod_files.c:1.100.2.3.2.8 --- php-src/ext/session/mod_files.c:1.100.2.3.2.7 Fri Aug 3 01:16:40 2007 +++ php-src/ext/session/mod_files.c Thu Aug 23 02:04:39 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: mod_files.c,v 1.100.2.3.2.7 2007/08/03 01:16:40 stas Exp $ */ +/* $Id: mod_files.c,v 1.100.2.3.2.8 2007/08/23 02:04:39 iliaa Exp $ */ #include php.h @@ -164,6 +164,28 @@ data-filemode); if (data-fd != -1) { +#ifndef PHP_WIN32 + /* check to make sure that the opened file is not a symlink, linking to data outside of allowable dirs */ + if (PG(safe_mode) || PG(open_basedir)) { + struct stat sbuf; + + if (fstat(data-fd, sbuf)) { + close(data-fd); + return; + } + if ( + S_ISLNK(sbuf.st_mode) + ( + php_check_open_basedir(buf TSRMLS_CC) || + (PG(safe_mode) !php_checkuid(buf, NULL, CHECKUID_CHECK_FILE_AND_DIR)) + ) + ) { + + close(data-fd); + return; + } + } +#endif flock(data-fd, LOCK_EX); #ifdef F_SETFD -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php