[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2005-10-04 Thread changelog
changelog   Wed Oct  5 01:44:00 2005 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.2122r2=1.2123ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2122 php-src/ChangeLog:1.2123
--- php-src/ChangeLog:1.2122Tue Oct  4 01:38:22 2005
+++ php-src/ChangeLog   Wed Oct  5 01:43:31 2005
@@ -1,3 +1,44 @@
+2005-10-04  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_0)
+  NEWS
+  NEWS
+  ext/standard/array.c
+  ext/standard/array.c:
+  MFH: fix #34723 (array_count_values() strips leading zeroes)
+
+* ext/standard/array.c:
+  fix #34723 (array_count_values() strips leading zeroes)
+
+* (PHP_5_0)
+  ext/oci8/oci8.c
+  ext/oci8/oci8.c:
+  fix #34731, patch by novicky at aarongroup dot cz
+
+* (PHP_4_4)
+  NEWS
+  ext/xmlrpc/xmlrpc-epi-php.c
+  ext/xmlrpc/xmlrpc-epi-php.c:
+  MFB5.1: fix #32179 (xmlrpc_encode() segfaults with recursive references)
+
+* (PHP_5_0)
+  NEWS
+  ext/xmlrpc/xmlrpc-epi-php.c:
+  MHB5.1: fix #32179 (xmlrpc_encode() segfaults with recursive references)
+
+* (PHP_5_1)
+  NEWS
+  ext/xmlrpc/xmlrpc-epi-php.c:
+  fix #32179 (xmlrpc_encode() segfaults with recursive references)
+
+2005-10-04  Dmitry Stogov  [EMAIL PROTECTED]
+
+* ext/standard/tests/strings/bug21453.phpt:
+  Unicode support
+
+* ext/standard/string.c:
+  Fixed compilation error (gcc-4).
+
 2005-10-03  Marcus Boerger  [EMAIL PROTECTED]
 
 * ZendEngine2/zend_execute.h:
@@ -13018,7 +13059,7 @@
 
 * (PHP_4_3)
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.2122 2005/10/04 05:38:22 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.2123 2005/10/05 05:43:31 changelog Exp $ tag
 
 * (PHP_5_0)
   ext/standard/url_scanner_ex.c:
@@ -16419,7 +16460,7 @@
   ext/session/mod_mm.h
   ext/session/mod_user.h
   ext/session/php_session.h:
-  - Missing $Id: ChangeLog,v 1.2122 2005/10/04 05:38:22 changelog Exp $ 
tags
+  - Missing $Id: ChangeLog,v 1.2123 2005/10/05 05:43:31 changelog Exp $ 
tags
 
 * (PHP_4_3)
   ext/session/session.c:
@@ -16900,7 +16941,7 @@
 
 * (PHP_4_3)
   Zend/zend_ini_scanner.l:
-  Missing $Id: ChangeLog,v 1.2122 2005/10/04 05:38:22 changelog Exp $ tag 
+ ws fix
+  Missing $Id: ChangeLog,v 1.2123 2005/10/05 05:43:31 changelog Exp $ tag 
+ ws fix
 
 * ZendEngine2/zend_ini_scanner.l
   ZendEngine2/zend_ini_scanner.l:
@@ -18374,7 +18415,7 @@
   ext/standard/url_scanner_ex.c
   ext/standard/url_scanner_ex.h
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.2122 2005/10/04 05:38:22 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.2123 2005/10/05 05:43:31 changelog Exp $ tag
 
 * ext/standard/credits_ext.h
   ext/standard/credits_sapi.h:


[PHP-CVS] cvs: php-src /ext/standard string.c

2005-10-04 Thread Dmitry Stogov
dmitry  Tue Oct  4 02:33:14 2005 EDT

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  Fixed compilation error (gcc-4).
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/string.c?r1=1.491r2=1.492ty=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.491 php-src/ext/standard/string.c:1.492
--- php-src/ext/standard/string.c:1.491 Mon Oct  3 13:00:00 2005
+++ php-src/ext/standard/string.c   Tue Oct  4 02:33:10 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.491 2005/10/03 17:00:00 rolland Exp $ */
+/* $Id: string.c,v 1.492 2005/10/04 06:33:10 dmitry Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -3469,46 +3469,46 @@
 }
 /* }}} */
 
-/* {{{ php_u_similar_char
+/* {{{ php_similar_char
  */
-static int php_u_similar_char(const UChar *txt1, int32_t len1, const UChar 
*txt2, int32_t len2)
+static int php_similar_char(const char *txt1, int len1, const char *txt2, int 
len2)
 {
-   int sum, max;
-   int32_t pos1, pos2, end1, end2;
+   int sum;
+   int pos1, pos2, max;
 
-   php_u_similar_str(txt1, len1, txt2, len2, pos1, end1, pos2, end2, 
max);
+   php_similar_str(txt1, len1, txt2, len2, pos1, pos2, max);
if ((sum = max)) {
if (pos1  pos2) {
-   sum += php_u_similar_char(txt1, pos1, txt2, pos2);
+   sum += php_similar_char(txt1, pos1, 
+   txt2, 
pos2);
}
-   if ((pos1 + end1  len1)  (pos2 + end2  len2)) {
-   sum += php_similar_char((UChar *)txt1+pos1+end1, 
len1-pos1-end1,
-   (UChar 
*)txt2+pos2+end2, len2-pos2-end2);
+   if ((pos1 + max  len1)  (pos2 + max  len2)) {
+   sum += php_similar_char(txt1 + pos1 + max, len1 - pos1 
- max, 
+   txt2 + 
pos2 + max, len2 - pos2 - max);
}
}
+
return sum;
 }
 /* }}} */
 
-/* {{{ php_similar_char
+/* {{{ php_u_similar_char
  */
-static int php_similar_char(const char *txt1, int len1, const char *txt2, int 
len2)
+static int php_u_similar_char(const UChar *txt1, int32_t len1, const UChar 
*txt2, int32_t len2)
 {
-   int sum;
-   int pos1, pos2, max;
+   int sum, max;
+   int32_t pos1, pos2, end1, end2;
 
-   php_similar_str(txt1, len1, txt2, len2, pos1, pos2, max);
+   php_u_similar_str(txt1, len1, txt2, len2, pos1, end1, pos2, end2, 
max);
if ((sum = max)) {
if (pos1  pos2) {
-   sum += php_similar_char(txt1, pos1, 
-   txt2, 
pos2);
+   sum += php_u_similar_char(txt1, pos1, txt2, pos2);
}
-   if ((pos1 + max  len1)  (pos2 + max  len2)) {
-   sum += php_similar_char(txt1 + pos1 + max, len1 - pos1 
- max, 
-   txt2 + 
pos2 + max, len2 - pos2 - max);
+   if ((pos1 + end1  len1)  (pos2 + end2  len2)) {
+   sum += php_similar_char((UChar *)txt1+pos1+end1, 
len1-pos1-end1,
+   (UChar 
*)txt2+pos2+end2, len2-pos2-end2);
}
}
-
return sum;
 }
 /* }}} */

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo config.m4

2005-10-04 Thread Marcus Boerger
helly   Tue Oct  4 03:44:58 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/pdoconfig.m4 
  Log:
  - Add optional dependency to SPL
  
http://cvs.php.net/diff.php/php-src/ext/pdo/config.m4?r1=1.15.2.1r2=1.15.2.2ty=u
Index: php-src/ext/pdo/config.m4
diff -u php-src/ext/pdo/config.m4:1.15.2.1 php-src/ext/pdo/config.m4:1.15.2.2
--- php-src/ext/pdo/config.m4:1.15.2.1  Sun Sep 11 15:44:26 2005
+++ php-src/ext/pdo/config.m4   Tue Oct  4 03:44:56 2005
@@ -1,4 +1,4 @@
-dnl $Id: config.m4,v 1.15.2.1 2005/09/11 19:44:26 wez Exp $
+dnl $Id: config.m4,v 1.15.2.2 2005/10/04 07:44:56 helly Exp $
 dnl config.m4 for extension pdo
 dnl vim:se ts=2 sw=2 et:
 
@@ -51,6 +51,7 @@
 esac
   fi
   PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c 
pdo_sqlstate.c, $ext_shared)
+  PHP_ADD_EXTENSION_DEP(pdo, spl, true) 
   
   ifdef([PHP_INSTALL_HEADERS],
   [

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings bug21453.phpt

2005-10-04 Thread Dmitry Stogov
dmitry  Tue Oct  4 03:59:20 2005 EDT

  Modified files:  
/php-src/ext/standard/tests/strings bug21453.phpt 
  Log:
  Unicode support
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/tests/strings/bug21453.phpt?r1=1.1r2=1.2ty=u
Index: php-src/ext/standard/tests/strings/bug21453.phpt
diff -u php-src/ext/standard/tests/strings/bug21453.phpt:1.1 
php-src/ext/standard/tests/strings/bug21453.phpt:1.2
--- php-src/ext/standard/tests/strings/bug21453.phpt:1.1Mon Jan  6 
17:13:03 2003
+++ php-src/ext/standard/tests/strings/bug21453.phptTue Oct  4 03:59:14 2005
@@ -16,3 +16,9 @@
first cell before  first cell after
second cell before  second cell after
 
+--UEXPECT--
+unicode(80) 
+
+   first cell before  first cell after
+   second cell before  second cell after
+

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



RE: [PHP-CVS] cvs: php-src /ext/standard string.c

2005-10-04 Thread Dmitry Stogov
Seems it is broken.

Dmitry.

 -Original Message-
 From: Rolland Santimano [mailto:[EMAIL PROTECTED] 
 Sent: Monday, October 03, 2005 9:00 PM
 To: php-cvs@lists.php.net
 Subject: [PHP-CVS] cvs: php-src /ext/standard string.c 
 
 
 rolland   Mon Oct  3 13:00:05 2005 EDT
 
   Modified files:  
 /php-src/ext/standard string.c 
   Log:
   - Unicode impl of strip_tags()
   
   
 

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/xmlrpc xmlrpc-epi-php.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 07:18:02 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  fix #32179 (xmlrpc_encode() segfaults with recursive references)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.90r2=1.2027.2.91ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.90 php-src/NEWS:1.2027.2.91
--- php-src/NEWS:1.2027.2.90Mon Oct  3 05:11:11 2005
+++ php-src/NEWSTue Oct  4 07:18:01 2005
@@ -144,6 +144,7 @@
   seg fault). (Dmitry)
 - Fixed bug #32937 (open_basedir looses trailing / in the limiter). (Adam 
Conrad)
 - Fixed bug #32589 (possible crash inside imap_mail_compose() function). (Ilia)
+- Fixed bug #32179 (xmlrpc_encode() segfaults with recursive references). 
(Tony)
 - Fixed bug #32139 (SOAP client does not auto-handle base64 encoding). (Ilia)
 - Fixed bug #32010 (Memory leak in mssql_fetch_batch). (fmk)
 - Fixed bug #29334 (win32 mail() provides incorrect Date: header). (Jani)
http://cvs.php.net/diff.php/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39r2=1.39.2.1ty=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.1
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39Wed Aug  3 10:08:22 2005
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Tue Oct  4 07:18:02 2005
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39 2005/08/03 14:08:22 sniper Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.1 2005/10/04 11:18:02 tony2001 Exp $ */
 
 /**
 * BUGS:   *
@@ -520,28 +520,41 @@
   unsigned long num_index;
   zval** pIter;
   char* my_key;
+  HashTable *ht = NULL;
 
+  ht = HASH_OF(val);
+  if (ht  ht-nApplyCount  1) {
+  php_error_docref(NULL TSRMLS_CC, E_ERROR, XML-RPC 
doesn't support circular references);
+  return NULL;
+  }
+  
   convert_to_array(val);
-
   xReturn = XMLRPC_CreateVector(key, 
determine_vector_type(Z_ARRVAL_P(val)));
 
   zend_hash_internal_pointer_reset(Z_ARRVAL_P(val));
-  while(1) {
+  while(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
  int res = my_zend_hash_get_current_key(Z_ARRVAL_P(val), 
my_key, num_index);
- if(res == HASH_KEY_IS_LONG) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
-}
- }
- else if(res == HASH_KEY_NON_EXISTANT) {
-break;
+
+ switch (res) {
+ case HASH_KEY_NON_EXISTANT:
+ break;
+ case HASH_KEY_IS_STRING:
+ case HASH_KEY_IS_LONG:
+  ht = HASH_OF(*pIter);
+ if (ht) {
+ ht-nApplyCount++;
+ }
+ if (res == HASH_KEY_IS_LONG) {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
+ }
+ else {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
+ }
+ if (ht) {
+ ht-nApplyCount--;
+ }
+ break;
  }
- else if(res == HASH_KEY_IS_STRING) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
-}
- }
-
  zend_hash_move_forward(Z_ARRVAL_P(val));
   }
}

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



[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/xmlrpc xmlrpc-epi-php.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 07:19:11 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  MHB5.1: fix #32179 (xmlrpc_encode() segfaults with recursive references)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.488r2=1.1760.2.489ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.488 php-src/NEWS:1.1760.2.489
--- php-src/NEWS:1.1760.2.488   Mon Oct  3 05:13:58 2005
+++ php-src/NEWSTue Oct  4 07:19:10 2005
@@ -14,6 +14,7 @@
 - Fixed bug #34449 (ext/soap: XSD_ANYXML functionality not exposed). (Dmitry)
 - Fixed bug #34199 (if($obj)/if(!$obj) inconsistency because of cast handler).
   (Dmitry, Alex)
+- Fixed bug #32179 (xmlrpc_encode() segfaults with recursive references). 
(Tony)
 
 05 Sep 2005, PHP 5.0.5
 - Upgraded PCRE library to version 5.0. (Andrei)
http://cvs.php.net/diff.php/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.37r2=1.37.2.1ty=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.37 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.37.2.1
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.37Thu Jan  8 03:17:47 2004
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Tue Oct  4 07:19:11 2005
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.37 2004/01/08 08:17:47 andi Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.37.2.1 2005/10/04 11:19:11 tony2001 Exp $ */
 
 /**
 * BUGS:   *
@@ -520,28 +520,41 @@
   unsigned long num_index;
   zval** pIter;
   char* my_key;
+  HashTable *ht = NULL;
 
+  ht = HASH_OF(val);
+  if (ht  ht-nApplyCount  1) {
+  php_error_docref(NULL TSRMLS_CC, E_ERROR, XML-RPC 
doesn't support circular references);
+  return NULL;
+  }
+  
   convert_to_array(val);
-
   xReturn = XMLRPC_CreateVector(key, 
determine_vector_type(Z_ARRVAL_P(val)));
 
   zend_hash_internal_pointer_reset(Z_ARRVAL_P(val));
-  while(1) {
+  while(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
  int res = my_zend_hash_get_current_key(Z_ARRVAL_P(val), 
my_key, num_index);
- if(res == HASH_KEY_IS_LONG) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
-}
- }
- else if(res == HASH_KEY_NON_EXISTANT) {
-break;
+
+ switch (res) {
+ case HASH_KEY_NON_EXISTANT:
+ break;
+ case HASH_KEY_IS_STRING:
+ case HASH_KEY_IS_LONG:
+  ht = HASH_OF(*pIter);
+ if (ht) {
+ ht-nApplyCount++;
+ }
+ if (res == HASH_KEY_IS_LONG) {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
+ }
+ else {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
+ }
+ if (ht) {
+ ht-nApplyCount--;
+ }
+ break;
  }
- else if(res == HASH_KEY_IS_STRING) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
-}
- }
-
  zend_hash_move_forward(Z_ARRVAL_P(val));
   }
}

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



[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /ext/xmlrpc xmlrpc-epi-php.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 07:19:56 2005 EDT

  Modified files:  (Branch: PHP_4_4)
/php-srcNEWS 
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  MFB5.1: fix #32179 (xmlrpc_encode() segfaults with recursive references)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.44r2=1.1247.2.920.2.45ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.44 php-src/NEWS:1.1247.2.920.2.45
--- php-src/NEWS:1.1247.2.920.2.44  Thu Sep 29 12:31:46 2005
+++ php-src/NEWSTue Oct  4 07:19:55 2005
@@ -43,6 +43,7 @@
 - Fixed bug #33156 (cygwin version of setitimer doesn't accept ITIMER_PROF).
   (Nuno)
 - Fixed bug #32589 (possible crash inside imap_mail_compose() function). (Ilia)
+- Fixed bug #32179 (xmlrpc_encode() segfaults with recursive references). 
(Tony)
 - Fixed bug #32160 (copying a file into itself leads to data loss). (Ilia)
 - Fixed bug #31158 (array_splice on $GLOBALS crashes). (Dmitry)
 - Fixed bug #29253 (array_diff with $GLOBALS argument fails). (Dmitry)
http://cvs.php.net/diff.php/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.24.2.4r2=1.24.2.4.4.1ty=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.24.2.4 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.24.2.4.4.1
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.24.2.4Thu Aug 28 16:01:32 2003
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Tue Oct  4 07:19:56 2005
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.24.2.4 2003/08/28 20:01:32 iliaa Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.24.2.4.4.1 2005/10/04 11:19:56 tony2001 Exp $ */
 
 /**
 * BUGS:   *
@@ -524,28 +524,41 @@
   unsigned long num_index;
   zval** pIter;
   char* my_key;
+  HashTable *ht = NULL;
 
+  ht = HASH_OF(val);
+  if (ht  ht-nApplyCount  1) {
+  php_error_docref(NULL TSRMLS_CC, E_ERROR, XML-RPC 
doesn't support circular references);
+  return NULL;
+  }
+  
   convert_to_array(val);
-
   xReturn = XMLRPC_CreateVector(key, 
determine_vector_type(Z_ARRVAL_P(val)));
 
   zend_hash_internal_pointer_reset(Z_ARRVAL_P(val));
-  while(1) {
+  while(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
  int res = my_zend_hash_get_current_key(Z_ARRVAL_P(val), 
my_key, num_index);
- if(res == HASH_KEY_IS_LONG) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
-}
- }
- else if(res == HASH_KEY_NON_EXISTANT) {
-break;
+
+ switch (res) {
+ case HASH_KEY_NON_EXISTANT:
+ break;
+ case HASH_KEY_IS_STRING:
+ case HASH_KEY_IS_LONG:
+  ht = HASH_OF(*pIter);
+ if (ht) {
+ ht-nApplyCount++;
+ }
+ if (res == HASH_KEY_IS_LONG) {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
+ }
+ else {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
+ }
+ if (ht) {
+ ht-nApplyCount--;
+ }
+ break;
  }
- else if(res == HASH_KEY_IS_STRING) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
-}
- }
-
  zend_hash_move_forward(Z_ARRVAL_P(val));
   }
}

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



[PHP-CVS] cvs: php-src /ext/xmlrpc xmlrpc-epi-php.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 08:07:25 2005 EDT

  Modified files:  
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  MFB5.1: fix #32179 (xmlrpc_encode() segfaults with recursive references)
  
  
http://cvs.php.net/diff.php/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39r2=1.40ty=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.40
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39Wed Aug  3 10:08:22 2005
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Tue Oct  4 08:07:24 2005
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39 2005/08/03 14:08:22 sniper Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.40 2005/10/04 12:07:24 tony2001 Exp $ */
 
 /**
 * BUGS:   *
@@ -520,28 +520,40 @@
   unsigned long num_index;
   zval** pIter;
   char* my_key;
+  HashTable *ht = NULL;
 
+  ht = HASH_OF(val);
+  if (ht  ht-nApplyCount  1) {
+  php_error_docref(NULL TSRMLS_CC, E_ERROR, XML-RPC 
doesn't support circular references);
+  return NULL;
+  }
+  
   convert_to_array(val);
-
   xReturn = XMLRPC_CreateVector(key, 
determine_vector_type(Z_ARRVAL_P(val)));
 
   zend_hash_internal_pointer_reset(Z_ARRVAL_P(val));
-  while(1) {
+  while(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
  int res = my_zend_hash_get_current_key(Z_ARRVAL_P(val), 
my_key, num_index);
- if(res == HASH_KEY_IS_LONG) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
-}
- }
- else if(res == HASH_KEY_NON_EXISTANT) {
-break;
+
+ switch (res) {
+ case HASH_KEY_NON_EXISTANT:
+ break;
+ default:
+  ht = HASH_OF(*pIter);
+ if (ht) {
+ ht-nApplyCount++;
+ }
+ if (res == HASH_KEY_IS_LONG) {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(0, *pIter, depth++));
+ }
+ else {
+ XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
+ }
+ if (ht) {
+ ht-nApplyCount--;
+ }
+ break;
  }
- else if(res == HASH_KEY_IS_STRING) {
-if(zend_hash_get_current_data(Z_ARRVAL_P(val), 
(void**)pIter) == SUCCESS) {
-   XMLRPC_AddValueToVector(xReturn, 
PHP_to_XMLRPC_worker(my_key, *pIter, depth++));
-}
- }
-
  zend_hash_move_forward(Z_ARRVAL_P(val));
   }
}

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/oci8 oci8.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 14:15:23 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/oci8   oci8.c 
  Log:
  fix #34731, patch by novicky at aarongroup dot cz
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.269.2.1r2=1.269.2.2ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.1 php-src/ext/oci8/oci8.c:1.269.2.2
--- php-src/ext/oci8/oci8.c:1.269.2.1   Thu Aug 18 09:34:36 2005
+++ php-src/ext/oci8/oci8.c Tue Oct  4 14:15:18 2005
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.269.2.1 2005/08/18 13:34:36 sniper Exp $ */
+/* $Id: oci8.c,v 1.269.2.2 2005/10/04 18:15:18 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -786,7 +786,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.269.2.1 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.269.2.2 $);
 
sprintf(buf, %ld, num_persistent);
php_info_print_table_row(2, Active Persistent Links, buf);
@@ -2879,7 +2879,6 @@
)
);
 
-   session-num = zend_list_insert(session, le_session);
session-is_open = 1;
 
mutex_lock(mx_lock);
@@ -2892,6 +2891,7 @@
}
mutex_unlock(mx_lock);
 
+   session-num = zend_list_insert(session, le_session);
oci_debug(_oci_open_session new sess=%d 
user=%s,session-num,username);
 
return session;

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/oci8 oci8.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 14:15:25 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/oci8   oci8.c 
  Log:
  fix #34731, patch by novicky at aarongroup dot cz
  
  
http://cvs.php.net/diff.php/php-src/ext/oci8/oci8.c?r1=1.257.2.8r2=1.257.2.9ty=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.257.2.8 php-src/ext/oci8/oci8.c:1.257.2.9
--- php-src/ext/oci8/oci8.c:1.257.2.8   Mon Jun 13 05:31:03 2005
+++ php-src/ext/oci8/oci8.c Tue Oct  4 14:15:23 2005
@@ -22,7 +22,7 @@
+--+
  */
 
-/* $Id: oci8.c,v 1.257.2.8 2005/06/13 09:31:03 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.257.2.9 2005/10/04 18:15:23 tony2001 Exp $ */
 
 /* TODO list:
  *
@@ -786,7 +786,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, OCI8 Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.257.2.8 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.257.2.9 $);
 
sprintf(buf, %ld, num_persistent);
php_info_print_table_row(2, Active Persistent Links, buf);
@@ -2879,7 +2879,6 @@
)
);
 
-   session-num = zend_list_insert(session, le_session);
session-is_open = 1;
 
mutex_lock(mx_lock);
@@ -2892,6 +2891,7 @@
}
mutex_unlock(mx_lock);
 
+   session-num = zend_list_insert(session, le_session);
oci_debug(_oci_open_session new sess=%d 
user=%s,session-num,username);
 
return session;

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



[PHP-CVS] cvs: CVSROOT / avail

2005-10-04 Thread Pierre-Alain Joye
pajoye  Tue Oct  4 15:15:06 2005 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  - olivierg karma for pear/Structures_DataGrid
  
  
http://cvs.php.net/diff.php/CVSROOT/avail?r1=1.1032r2=1.1033ty=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1032 CVSROOT/avail:1.1033
--- CVSROOT/avail:1.1032Sun Oct  2 13:07:05 2005
+++ CVSROOT/avail   Tue Oct  4 15:15:04 2005
@@ -236,7 +236,7 @@
 avail|bjori|pear/Net_FTP,pear/Validate
 avail|cyberscribe|pear/Net_Monitor
 avail|mroch|pear/XML_RPC
-avail|olivierg|pear/XML_Indexing
+avail|olivierg|pear/XML_Indexing,pear/Structures_DataGrid
 avail|djg|pear/File_Ogg
 avail|vincentlascaux|pear/File_Archive
 avail|mg|pecl/lzf

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



[PHP-CVS] cvs: php-src /ext/standard array.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 16:47:50 2005 EDT

  Modified files:  
/php-src/ext/standard   array.c 
  Log:
  fix #34723 (array_count_values() strips leading zeroes)
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.326r2=1.327ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.326 php-src/ext/standard/array.c:1.327
--- php-src/ext/standard/array.c:1.326  Mon Oct  3 10:01:36 2005
+++ php-src/ext/standard/array.cTue Oct  4 16:47:48 2005
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.326 2005/10/03 14:01:36 iliaa Exp $ */
+/* $Id: array.c,v 1.327 2005/10/04 20:47:48 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2726,9 +2726,10 @@
} else if (Z_TYPE_PP(entry) == IS_STRING ||
   Z_TYPE_PP(entry) == IS_BINARY ||
   Z_TYPE_PP(entry) == IS_UNICODE) {
-   /* make sure our array does not end up with numeric 
string keys */
-   if ((Z_TYPE_PP(entry) == IS_STRING  
is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == 
IS_LONG) ||
-   (Z_TYPE_PP(entry) == IS_UNICODE  
is_numeric_unicode(Z_USTRVAL_PP(entry), Z_USTRLEN_PP(entry), NULL, NULL, 0) == 
IS_LONG)) {
+   /* make sure our array does not end up with numeric 
string keys 
+* but don't touch those strings that start with 0 */
+   if ((Z_TYPE_PP(entry) == IS_STRING  
!(Z_STRLEN_PP(entry)  1  Z_STRVAL_PP(entry)[0] == '0')  
is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, NULL, 0) == 
IS_LONG) ||
+   (Z_TYPE_PP(entry) == IS_UNICODE  
zend_cmp_unicode_and_literal(Z_USTRVAL_PP(entry), 1, 0, sizeof(0)-1)  
is_numeric_unicode(Z_USTRVAL_PP(entry), Z_USTRLEN_PP(entry), NULL, NULL, 0) == 
IS_LONG)) {
zval tmp_entry;

tmp_entry = **entry;

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/standard array.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 16:48:23 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/standard   array.c 
/php-srcNEWS 
  Log:
  MFH: fix #34723 (array_count_values() strips leading zeroes)
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.308.2.5r2=1.308.2.6ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.5 
php-src/ext/standard/array.c:1.308.2.6
--- php-src/ext/standard/array.c:1.308.2.5  Mon Oct  3 10:04:16 2005
+++ php-src/ext/standard/array.cTue Oct  4 16:48:17 2005
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.308.2.5 2005/10/03 14:04:16 iliaa Exp $ */
+/* $Id: array.c,v 1.308.2.6 2005/10/04 20:48:17 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2520,8 +2520,9 @@
Z_LVAL_PP(tmp)++;
}
} else if (Z_TYPE_PP(entry) == IS_STRING) {
-   /* make sure our array does not end up with numeric 
string keys */
-   if (is_numeric_string(Z_STRVAL_PP(entry), 
Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) {
+   /* make sure our array does not end up with numeric 
string keys
+* but don't touch those strings that start with 0 */
+   if (!(Z_STRLEN_PP(entry)  1  Z_STRVAL_PP(entry)[0] 
== '0')  is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, 
NULL, 0) == IS_LONG) {
zval tmp_entry;

tmp_entry = **entry;
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.91r2=1.2027.2.92ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.91 php-src/NEWS:1.2027.2.92
--- php-src/NEWS:1.2027.2.91Tue Oct  4 07:18:01 2005
+++ php-src/NEWSTue Oct  4 16:48:17 2005
@@ -40,6 +40,7 @@
 - Fixed make test to work for phpized extensions. (Hartmut, Jani)
 - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
   (Andrey)
+- Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony)
 - Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry)
 - Fixed bug #34645 (ctype corrupts memory when validating large numbers). 
(Ilia)
 - Fixed bug #34643 (wsdl default value has no effect). (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_0) / NEWS /ext/standard array.c

2005-10-04 Thread Antony Dovgal
tony2001Tue Oct  4 16:49:36 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
/php-src/ext/standard   array.c 
  Log:
  MFH: fix #34723 (array_count_values() strips leading zeroes)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.489r2=1.1760.2.490ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.489 php-src/NEWS:1.1760.2.490
--- php-src/NEWS:1.1760.2.489   Tue Oct  4 07:19:10 2005
+++ php-src/NEWSTue Oct  4 16:49:33 2005
@@ -2,6 +2,7 @@
 |||
 ?? ??? , PHP 5.0.6
 - Renamed CachingRecursiveIterator to RecursiveCachingIterator. (Marcus)
+- Fixed bug #34723 (array_count_values() strips leading zeroes). (Tony)
 - Fixed bug #34678 (__call(), is_callable() and static methods). (Dmitry)
 - Fixed bug #34643 (wsdl default value has no effect). (Dmitry)
 - Fixed bug #34617 (zend_deactivate: objects_store used after
http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266.2.27r2=1.266.2.28ty=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.266.2.27 
php-src/ext/standard/array.c:1.266.2.28
--- php-src/ext/standard/array.c:1.266.2.27 Mon Oct  3 10:04:41 2005
+++ php-src/ext/standard/array.cTue Oct  4 16:49:35 2005
@@ -21,7 +21,7 @@
+--+
 */
 
-/* $Id: array.c,v 1.266.2.27 2005/10/03 14:04:41 iliaa Exp $ */
+/* $Id: array.c,v 1.266.2.28 2005/10/04 20:49:35 tony2001 Exp $ */
 
 #include php.h
 #include php_ini.h
@@ -2491,8 +2491,9 @@
Z_LVAL_PP(tmp)++;
}
} else if (Z_TYPE_PP(entry) == IS_STRING) {
-   /* make sure our array does not end up with numeric 
string keys */
-   if (is_numeric_string(Z_STRVAL_PP(entry), 
Z_STRLEN_PP(entry), NULL, NULL, 0) == IS_LONG) {
+   /* make sure our array does not end up with numeric 
string keys
+* but don't touch those strings that start with 0 */
+   if (!(Z_STRLEN_PP(entry)  1  Z_STRVAL_PP(entry)[0] 
== '0')  is_numeric_string(Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, 
NULL, 0) == IS_LONG) {
zval tmp_entry;

tmp_entry = **entry;

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



[PHP-CVS] cvs: php-src /sapi/apache2handler sapi_apache2.c

2005-10-04 Thread Ilia Alshanetsky
iliaa   Tue Oct  4 20:42:58 2005 EDT

  Modified files:  
/php-src/sapi/apache2handlersapi_apache2.c 
  Log:
  MFH: Fixed possible INI setting leak via virtual() in Apache 2 sapi.
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.59r2=1.60ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.59 
php-src/sapi/apache2handler/sapi_apache2.c:1.60
--- php-src/sapi/apache2handler/sapi_apache2.c:1.59 Fri Sep  2 09:50:39 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Tue Oct  4 20:42:54 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.59 2005/09/02 13:50:39 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.60 2005/10/05 00:42:54 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -453,6 +453,11 @@
request_rec *parent_req = NULL;
TSRMLS_FETCH();
 
+#define PHPAP_INI_OFF \
+   if (strcmp(r-protocol, INCLUDED)) { \
+   zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
+   } \
+
conf = ap_get_module_config(r-per_dir_config, php5_module);
 
/* apply_config() needs r in some cases, so allocate server_context 
early */
@@ -475,9 +480,7 @@
if (strcmp(r-handler, PHP_MAGIC_TYPE)  strcmp(r-handler, 
PHP_SOURCE_MAGIC_TYPE)  strcmp(r-handler, PHP_SCRIPT)) {
/* Check for xbithack in this case. */
if (!AP2(xbithack) || strcmp(r-handler, text/html) || 
!(r-finfo.protection  APR_UEXECUTE)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
}
@@ -486,32 +489,24 @@
 * the configuration; default behaviour is to accept. */ 
if (r-used_path_info == AP_REQ_REJECT_PATH_INFO
 r-path_info  r-path_info[0]) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
 
/* handle situations where user turns the engine off */
if (!AP2(engine)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
 
if (r-finfo.filetype == 0) {
php_apache_sapi_log_message_ex(script '%s' not found or unable 
to stat, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
if (r-finfo.filetype == APR_DIR) {
php_apache_sapi_log_message_ex(attempt to invoke directory 
'%s' as script, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_FORBIDDEN;
}
 

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /sapi/apache2handler sapi_apache2.c

2005-10-04 Thread Ilia Alshanetsky
iliaa   Tue Oct  4 20:43:39 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/apache2handlersapi_apache2.c 
/php-srcNEWS 
  Log:
  MFH: Fixed possible INI setting leak via virtual() in Apache 2 sapi.
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.57.2.2r2=1.57.2.3ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.2 
php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.3
--- php-src/sapi/apache2handler/sapi_apache2.c:1.57.2.2 Fri Sep  2 09:51:47 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Tue Oct  4 20:43:38 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.57.2.2 2005/09/02 13:51:47 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.57.2.3 2005/10/05 00:43:38 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -453,6 +453,11 @@
request_rec *parent_req = NULL;
TSRMLS_FETCH();
 
+#define PHPAP_INI_OFF \
+   if (strcmp(r-protocol, INCLUDED)) { \
+   zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
+   } \
+
conf = ap_get_module_config(r-per_dir_config, php5_module);
 
/* apply_config() needs r in some cases, so allocate server_context 
early */
@@ -475,9 +480,7 @@
if (strcmp(r-handler, PHP_MAGIC_TYPE)  strcmp(r-handler, 
PHP_SOURCE_MAGIC_TYPE)  strcmp(r-handler, PHP_SCRIPT)) {
/* Check for xbithack in this case. */
if (!AP2(xbithack) || strcmp(r-handler, text/html) || 
!(r-finfo.protection  APR_UEXECUTE)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
}
@@ -486,32 +489,24 @@
 * the configuration; default behaviour is to accept. */ 
if (r-used_path_info == AP_REQ_REJECT_PATH_INFO
 r-path_info  r-path_info[0]) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
 
/* handle situations where user turns the engine off */
if (!AP2(engine)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
 
if (r-finfo.filetype == 0) {
php_apache_sapi_log_message_ex(script '%s' not found or unable 
to stat, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
if (r-finfo.filetype == APR_DIR) {
php_apache_sapi_log_message_ex(attempt to invoke directory 
'%s' as script, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_FORBIDDEN;
}
 
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.92r2=1.2027.2.93ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.92 php-src/NEWS:1.2027.2.93
--- php-src/NEWS:1.2027.2.92Tue Oct  4 16:48:17 2005
+++ php-src/NEWSTue Oct  4 20:43:38 2005
@@ -30,6 +30,7 @@
   . ext/oracle (Jani, Derick)
   . ext/ovrimos (Jani, Derick, Pierre)
   . ext/pfpro (Jani, Derick, Pierre)
+- Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia)
 - Fixed potential GLOBALS overwrite via import_request_variables() and
   possible crash and/or memory corruption. (Ilia)
 - Fixed possible GLOBALS variable override when register_globals are ON.

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



[PHP-CVS] cvs: php-src(PHP_5_0) /sapi/apache2handler sapi_apache2.c

2005-10-04 Thread Ilia Alshanetsky
iliaa   Tue Oct  4 20:44:04 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/sapi/apache2handlersapi_apache2.c 
  Log:
  MFH: Fixed possible INI setting leak via virtual() in Apache 2 sapi.
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.40.2.11r2=1.40.2.12ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.11 
php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.12
--- php-src/sapi/apache2handler/sapi_apache2.c:1.40.2.11Fri Sep  2 
09:51:26 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Tue Oct  4 20:44:04 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.40.2.11 2005/09/02 13:51:26 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.40.2.12 2005/10/05 00:44:04 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -446,15 +446,18 @@
request_rec *parent_req = NULL;
TSRMLS_FETCH();
 
+#define PHPAP_INI_OFF \
+   if (strcmp(r-protocol, INCLUDED)) { \
+   zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
+   } \
+
conf = ap_get_module_config(r-per_dir_config, php5_module);
apply_config(conf);
 
if (strcmp(r-handler, PHP_MAGIC_TYPE)  strcmp(r-handler, 
PHP_SOURCE_MAGIC_TYPE)  strcmp(r-handler, PHP_SCRIPT)) {
/* Check for xbithack in this case. */
if (!AP2(xbithack) || strcmp(r-handler, text/html) || 
!(r-finfo.protection  APR_UEXECUTE)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
}
@@ -463,32 +466,24 @@
 * the configuration; default behaviour is to accept. */ 
if (r-used_path_info == AP_REQ_REJECT_PATH_INFO
 r-path_info  r-path_info[0]) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
 
/* handle situations where user turns the engine off */
if (!AP2(engine)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
 
if (r-finfo.filetype == 0) {
php_apache_sapi_log_message_ex(script '%s' not found or unable 
to stat, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
if (r-finfo.filetype == APR_DIR) {
php_apache_sapi_log_message_ex(attempt to invoke directory 
'%s' as script, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_FORBIDDEN;
}
 

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



[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /sapi/apache2handler sapi_apache2.c

2005-10-04 Thread Ilia Alshanetsky
iliaa   Tue Oct  4 20:50:15 2005 EDT

  Modified files:  (Branch: PHP_4_4)
/php-src/sapi/apache2handlersapi_apache2.c 
/php-srcNEWS 
  Log:
  MFH: Fixed possible INI setting leak via virtual() in Apache 2 sapi.
  
  
http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.1.2.40.2.3r2=1.1.2.40.2.4ty=u
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.3 
php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.4
--- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.40.2.3 Fri Sep  2 
09:52:55 2005
+++ php-src/sapi/apache2handler/sapi_apache2.c  Tue Oct  4 20:50:11 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: sapi_apache2.c,v 1.1.2.40.2.3 2005/09/02 13:52:55 sniper Exp $ */
+/* $Id: sapi_apache2.c,v 1.1.2.40.2.4 2005/10/05 00:50:11 iliaa Exp $ */
 
 #include fcntl.h
 
@@ -453,6 +453,11 @@
request_rec *parent_req = NULL;
TSRMLS_FETCH();
 
+#define PHPAP_INI_OFF \
+   if (strcmp(r-protocol, INCLUDED)) { \
+   zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \
+   } \
+
conf = ap_get_module_config(r-per_dir_config, php4_module);
 
/* apply_config() needs r in some cases, so allocate server_context 
early */
@@ -474,9 +479,7 @@
if (strcmp(r-handler, PHP_MAGIC_TYPE)  strcmp(r-handler, 
PHP_SOURCE_MAGIC_TYPE)  strcmp(r-handler, PHP_SCRIPT)) {
/* Check for xbithack in this case. */
if (!AP2(xbithack) || strcmp(r-handler, text/html) || 
!(r-finfo.protection  APR_UEXECUTE)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
}
@@ -485,32 +488,24 @@
 * the configuration; default behaviour is to accept. */ 
if (r-used_path_info == AP_REQ_REJECT_PATH_INFO
 r-path_info  r-path_info[0]) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
 
/* handle situations where user turns the engine off */
if (!AP2(engine)) {
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return DECLINED;
}
 
if (r-finfo.filetype == 0) {
php_apache_sapi_log_message_ex(script '%s' not found or unable 
to stat, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_NOT_FOUND;
}
if (r-finfo.filetype == APR_DIR) {
php_apache_sapi_log_message_ex(attempt to invoke directory 
'%s' as script, r);
-   zend_try {
-   zend_ini_deactivate(TSRMLS_C);
-   } zend_end_try();
+   PHPAP_INI_OFF;
return HTTP_FORBIDDEN;
}
 
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.920.2.45r2=1.1247.2.920.2.46ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.45 php-src/NEWS:1.1247.2.920.2.46
--- php-src/NEWS:1.1247.2.920.2.45  Tue Oct  4 07:19:55 2005
+++ php-src/NEWSTue Oct  4 20:50:13 2005
@@ -1,6 +1,7 @@
 PHP 4  NEWS
 |||
 ?? ??? 2005, Version 4.4.1
+- Fixed possible INI setting leak via virtual() in Apache 2 sapi. (Ilia)
 - Fixed possible crash and/or memory corruption in import_request_variables().
   (Ilia)
 - Fixed potential GLOBALS overwrite via import_request_variables(). (Ilia)

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