[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2005-05-06 Thread changelog
changelog   Fri May  6 20:36:12 2005 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.688r2=1.689ty=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.688 ZendEngine2/ChangeLog:1.689
--- ZendEngine2/ChangeLog:1.688 Thu May  5 20:34:56 2005
+++ ZendEngine2/ChangeLog   Fri May  6 20:36:11 2005
@@ -1,3 +1,8 @@
+2005-05-06  Jani Taskinen  [EMAIL PROTECTED]
+
+* zend_object_handlers.h:
+  typofix :)
+
 2005-05-05  Dmitry Stogov  [EMAIL PROTECTED]
 
 * zend_compile.c
@@ -7885,7 +7890,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.688 2005/05/06 00:34:56 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.689 2005/05/07 00:36:11 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -9609,7 +9614,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.688 2005/05/06 00:34:56 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.689 2005/05/07 00:36:11 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


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

2005-05-06 Thread changelog
changelog   Fri May  6 20:36:02 2005 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1975r2=1.1976ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.1975 php-src/ChangeLog:1.1976
--- php-src/ChangeLog:1.1975Thu May  5 20:34:40 2005
+++ php-src/ChangeLog   Fri May  6 20:36:00 2005
@@ -1,3 +1,87 @@
+2005-05-06  Jani Taskinen  [EMAIL PROTECTED]
+
+* ext/sqlite/config.m4:
+  cleanup
+
+2005-05-06  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_4_3)
+  ext/standard/ftp_fopen_wrapper.c
+  ext/standard/ftp_fopen_wrapper.c:
+  MFH: Check ftp user name for control characters.
+
+* ext/standard/ftp_fopen_wrapper.c:
+  Check ftp user name for control characters.
+
+2005-05-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_4_3)
+  ext/gd/gd.c
+  ext/gd/gd.c
+  main/php_open_temporary_file.c
+  main/php_open_temporary_file.c:
+  MFH: fix off-by-one in _php_image_output()
+  and prevent such errors in php_do_open_temporary_file()
+
+* ext/gd/gd.c
+  main/php_open_temporary_file.c:
+  fix off-by-one in _php_image_output()
+  and prevent such errors in php_do_open_temporary_file()
+
+2005-05-06  Andrey Hristov  [EMAIL PROTECTED]
+
+* ext/mysqli/mysqli_api.c
+  ext/mysqli/mysqli_nonapi.c:
+  initialize values because the call to zend_parse_parameters may not do it
+
+2005-05-06  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* NEWS
+  ext/standard/http_fopen_wrapper.c:
+  Added max_redirects context option that specifies how many HTTP redirects
+  to follow.
+
+* ext/standard/http_fopen_wrapper.c:
+  Missing bit from previous patch.
+
+* (PHP_5_0)
+  ext/standard/http_fopen_wrapper.c:
+  Added missing bit of the previous patch.
+
+* (PHP_4_3)
+  NEWS
+  NEWS
+  ext/standard/http_fopen_wrapper.c
+  ext/standard/http_fopen_wrapper.c:
+  MFH: Fixed bug #32936 (http redirects URLs are not checked for control
+  chars).
+
+* ext/standard/http_fopen_wrapper.c:
+  Fixed bug #32936 (http redirects URLs are not checked for control chars).
+
+2005-05-06  Jani Taskinen  [EMAIL PROTECTED]
+
+* tests/lang/inc.inc:
+  ? should die..
+
+* NEWS
+  NEWS:
+  reorder
+
+* NEWS:
+  - No need to add NEWS entries for bugs that do NOT exist in any released
+  version of PHP
+
+* (PHP_5_0)
+  NEWS:
+  typo
+
+* ZendEngine2/zend_object_handlers.h:
+  typofix :)
+
+* NEWS:
+  verbose,order,etc.
+
 2005-05-05  Jani Taskinen  [EMAIL PROTECTED]
 
 * ext/standard/math.c:
@@ -1697,7 +1781,7 @@
 
 * (PHP_4_3)
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.1975 2005/05/06 00:34:40 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.1976 2005/05/07 00:36:00 changelog Exp $ tag
 
 * (PHP_5_0)
   ext/standard/url_scanner_ex.c:
@@ -5098,7 +5182,7 @@
   ext/session/mod_mm.h
   ext/session/mod_user.h
   ext/session/php_session.h:
-  - Missing $Id: ChangeLog,v 1.1975 2005/05/06 00:34:40 changelog Exp $ 
tags
+  - Missing $Id: ChangeLog,v 1.1976 2005/05/07 00:36:00 changelog Exp $ 
tags
 
 * (PHP_4_3)
   ext/session/session.c:
@@ -5579,7 +5663,7 @@
 
 * (PHP_4_3)
   Zend/zend_ini_scanner.l:
-  Missing $Id: ChangeLog,v 1.1975 2005/05/06 00:34:40 changelog Exp $ tag 
+ ws fix
+  Missing $Id: ChangeLog,v 1.1976 2005/05/07 00:36:00 changelog Exp $ tag 
+ ws fix
 
 * ZendEngine2/zend_ini_scanner.l
   ZendEngine2/zend_ini_scanner.l:
@@ -7053,7 +7137,7 @@
   ext/standard/url_scanner_ex.c
   ext/standard/url_scanner_ex.h
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.1975 2005/05/06 00:34:40 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.1976 2005/05/07 00:36:00 changelog Exp $ tag
 
 * ext/standard/credits_ext.h
   ext/standard/credits_sapi.h:


[PHP-CVS] cvs: php-src /ext/mysqli mysqli_api.c mysqli_nonapi.c

2005-05-06 Thread Andrey Hristov
andrey  Fri May  6 06:09:45 2005 EDT

  Modified files:  
/php-src/ext/mysqli mysqli_api.c mysqli_nonapi.c 
  Log:
  initialize values because the call to zend_parse_parameters may not do it
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.108r2=1.109ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.108 
php-src/ext/mysqli/mysqli_api.c:1.109
--- php-src/ext/mysqli/mysqli_api.c:1.108   Thu May  5 09:02:31 2005
+++ php-src/ext/mysqli/mysqli_api.c Fri May  6 06:09:42 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_api.c,v 1.108 2005/05/05 13:02:31 georg Exp $ 
+  $Id: mysqli_api.c,v 1.109 2005/05/06 10:09:42 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1307,7 +1307,7 @@
 {
MY_MYSQL*mysql;
char*hostname = NULL, *username=NULL, *passwd=NULL, 
*dbname=NULL, *socket=NULL;
-   unsigned inthostname_len, username_len, passwd_len, dbname_len, 
socket_len;
+   unsigned inthostname_len = 0, username_len = 0, passwd_len = 0, 
dbname_len = 0, socket_len = 0;
unsigned long   port=0, flags=0;
zval*mysql_link;
zval*object = getThis();
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.41r2=1.42ty=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.41 
php-src/ext/mysqli/mysqli_nonapi.c:1.42
--- php-src/ext/mysqli/mysqli_nonapi.c:1.41 Wed Apr 27 08:12:58 2005
+++ php-src/ext/mysqli/mysqli_nonapi.c  Fri May  6 06:09:42 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter [EMAIL PROTECTED]|
   +--+
 
-  $Id: mysqli_nonapi.c,v 1.41 2005/04/27 12:12:58 andrey Exp $ 
+  $Id: mysqli_nonapi.c,v 1.42 2005/05/06 10:09:42 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -37,7 +37,7 @@
MYSQLI_RESOURCE *mysqli_resource;
zval*object = getThis();
char*hostname = NULL, *username=NULL, 
*passwd=NULL, *dbname=NULL, *socket=NULL;
-   unsigned inthostname_len, username_len, passwd_len, 
dbname_len, socket_len;
+   unsigned inthostname_len = 0, username_len = 0, passwd_len 
= 0, dbname_len = 0, socket_len = 0;
longport=0;
 
if (getThis()  !ZEND_NUM_ARGS()) {

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/gd gd.c /main php_open_temporary_file.c

2005-05-06 Thread Antony Dovgal
tony2001Fri May  6 12:51:55 2005 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/main   php_open_temporary_file.c 
/php-src/ext/gd gd.c 
  Log:
  MFH: fix off-by-one in _php_image_output()
  and prevent such errors in php_do_open_temporary_file()
  
  
http://cvs.php.net/diff.php/php-src/main/php_open_temporary_file.c?r1=1.18.2.9r2=1.18.2.10ty=u
Index: php-src/main/php_open_temporary_file.c
diff -u php-src/main/php_open_temporary_file.c:1.18.2.9 
php-src/main/php_open_temporary_file.c:1.18.2.10
--- php-src/main/php_open_temporary_file.c:1.18.2.9 Mon Mar 29 16:28:47 2004
+++ php-src/main/php_open_temporary_file.c  Fri May  6 12:51:54 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_open_temporary_file.c,v 1.18.2.9 2004/03/29 21:28:47 wez Exp $ */
+/* $Id: php_open_temporary_file.c,v 1.18.2.10 2005/05/06 16:51:54 tony2001 Exp 
$ */
 
 #include php.h
 
@@ -106,6 +106,7 @@
 {
char *trailing_slash;
char *opened_path;
+   int path_len = 0;
int fd = -1;
 #ifndef HAVE_MKSTEMP
int open_flags = O_CREAT | O_TRUNC | O_RDWR
@@ -122,11 +123,13 @@
return -1;
}
 
+   path_len = strlen(path);
+
if (!(opened_path = emalloc(MAXPATHLEN))) {
return -1;
}
 
-   if (IS_SLASH(path[strlen(path)-1])) {
+   if (!path_len || IS_SLASH(path[path_len - 1])) {
trailing_slash = ;
} else {
trailing_slash = /;
http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.221.2.55r2=1.221.2.56ty=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.221.2.55 php-src/ext/gd/gd.c:1.221.2.56
--- php-src/ext/gd/gd.c:1.221.2.55  Mon May  2 05:39:26 2005
+++ php-src/ext/gd/gd.c Fri May  6 12:51:54 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.221.2.55 2005/05/02 09:39:26 pajoye Exp $ */
+/* $Id: gd.c,v 1.221.2.56 2005/05/06 16:51:54 tony2001 Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -1699,7 +1699,7 @@
char  buf[4096];
char *path;
 
-   tmp = php_open_temporary_file(, , path TSRMLS_CC);
+   tmp = php_open_temporary_file(NULL, NULL, path TSRMLS_CC);
if (tmp == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to 
open temporary file);
RETURN_FALSE;

-- 
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/gd gd.c /main php_open_temporary_file.c

2005-05-06 Thread Antony Dovgal
tony2001Fri May  6 12:49:04 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/main   php_open_temporary_file.c 
/php-src/ext/gd gd.c 
  Log:
  MFH: fix off-by-one in _php_image_output()
  and prevent such errors in php_do_open_temporary_file()
  
  
http://cvs.php.net/diff.php/php-src/main/php_open_temporary_file.c?r1=1.30.2.1r2=1.30.2.2ty=u
Index: php-src/main/php_open_temporary_file.c
diff -u php-src/main/php_open_temporary_file.c:1.30.2.1 
php-src/main/php_open_temporary_file.c:1.30.2.2
--- php-src/main/php_open_temporary_file.c:1.30.2.1 Fri Mar 11 03:18:14 2005
+++ php-src/main/php_open_temporary_file.c  Fri May  6 12:49:04 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_open_temporary_file.c,v 1.30.2.1 2005/03/11 08:18:14 hyanantha Exp 
$ */
+/* $Id: php_open_temporary_file.c,v 1.30.2.2 2005/05/06 16:49:04 tony2001 Exp 
$ */
 
 #include php.h
 
@@ -104,6 +104,7 @@
 {
char *trailing_slash;
char *opened_path;
+   int path_len = 0;
int fd = -1;
 #ifndef HAVE_MKSTEMP
int open_flags = O_CREAT | O_TRUNC | O_RDWR
@@ -120,11 +121,13 @@
return -1;
}
 
+   path_len = strlen(path);
+
if (!(opened_path = emalloc(MAXPATHLEN))) {
return -1;
}
 
-   if (IS_SLASH(path[strlen(path)-1])) {
+   if (!path_len || IS_SLASH(path[path_len - 1])) {
trailing_slash = ;
} else {
trailing_slash = /;
http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.294.2.11r2=1.294.2.12ty=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.294.2.11 php-src/ext/gd/gd.c:1.294.2.12
--- php-src/ext/gd/gd.c:1.294.2.11  Mon Jan 17 12:07:47 2005
+++ php-src/ext/gd/gd.c Fri May  6 12:49:04 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.294.2.11 2005/01/17 17:07:47 sniper Exp $ */
+/* $Id: gd.c,v 1.294.2.12 2005/05/06 16:49:04 tony2001 Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1781,7 +1781,7 @@
char  buf[4096];
char *path;
 
-   tmp = php_open_temporary_file(, , path TSRMLS_CC);
+   tmp = php_open_temporary_file(NULL, NULL, path TSRMLS_CC);
if (tmp == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to 
open temporary file);
RETURN_FALSE;

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



[PHP-CVS] cvs: php-src /ext/gd gd.c /main php_open_temporary_file.c

2005-05-06 Thread Antony Dovgal
tony2001Fri May  6 12:48:30 2005 EDT

  Modified files:  
/php-src/main   php_open_temporary_file.c 
/php-src/ext/gd gd.c 
  Log:
  fix off-by-one in _php_image_output()
  and prevent such errors in php_do_open_temporary_file()
  
  
http://cvs.php.net/diff.php/php-src/main/php_open_temporary_file.c?r1=1.32r2=1.33ty=u
Index: php-src/main/php_open_temporary_file.c
diff -u php-src/main/php_open_temporary_file.c:1.32 
php-src/main/php_open_temporary_file.c:1.33
--- php-src/main/php_open_temporary_file.c:1.32 Wed Feb 23 05:54:06 2005
+++ php-src/main/php_open_temporary_file.c  Fri May  6 12:48:30 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_open_temporary_file.c,v 1.32 2005/02/23 10:54:06 hyanantha Exp $ */
+/* $Id: php_open_temporary_file.c,v 1.33 2005/05/06 16:48:30 tony2001 Exp $ */
 
 #include php.h
 
@@ -98,6 +98,7 @@
 {
char *trailing_slash;
char *opened_path;
+   int path_len = 0;
int fd = -1;
 #ifndef HAVE_MKSTEMP
int open_flags = O_CREAT | O_TRUNC | O_RDWR
@@ -111,11 +112,13 @@
return -1;
}
 
+   path_len = strlen(path);
+
if (!(opened_path = emalloc(MAXPATHLEN))) {
return -1;
}
 
-   if (IS_SLASH(path[strlen(path)-1])) {
+   if (!path_len || IS_SLASH(path[path_len - 1])) {
trailing_slash = ;
} else {
trailing_slash = /;
http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.310r2=1.311ty=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.310 php-src/ext/gd/gd.c:1.311
--- php-src/ext/gd/gd.c:1.310   Sun Apr 17 06:17:03 2005
+++ php-src/ext/gd/gd.c Fri May  6 12:48:30 2005
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.310 2005/04/17 10:17:03 derick Exp $ */
+/* $Id: gd.c,v 1.311 2005/05/06 16:48:30 tony2001 Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1778,7 +1778,7 @@
char  buf[4096];
char *path;
 
-   tmp = php_open_temporary_file(, , path TSRMLS_CC);
+   tmp = php_open_temporary_file(NULL, NULL, path TSRMLS_CC);
if (tmp == NULL) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to 
open temporary file);
RETURN_FALSE;

-- 
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/standard ftp_fopen_wrapper.c

2005-05-06 Thread Ilia Alshanetsky
iliaa   Fri May  6 14:43:13 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/standard   ftp_fopen_wrapper.c 
  Log:
  MFH: Check ftp user name for control characters. 
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.74.2.4r2=1.74.2.5ty=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.74.2.4 
php-src/ext/standard/ftp_fopen_wrapper.c:1.74.2.5
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.74.2.4   Mon Mar 21 03:42:34 2005
+++ php-src/ext/standard/ftp_fopen_wrapper.cFri May  6 14:43:13 2005
@@ -18,7 +18,7 @@
|  Sara Golemon [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.74.2.4 2005/03/21 08:42:34 hyanantha Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.74.2.5 2005/05/06 18:43:13 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -209,7 +209,20 @@
/* send the user name */
php_stream_write_string(stream, USER );
if (resource-user != NULL) {
-   php_raw_url_decode(resource-user, strlen(resource-user));
+   unsigned char *s, *e;
+   int user_len = php_raw_url_decode(resource-user, 
strlen(resource-user));
+   
+   s = resource-user;
+   e = s + user_len;
+   /* check for control characters that should not be present in 
the user name */
+   while (s  e) {
+   if (iscntrl(*s)) {
+   php_stream_wrapper_log_error(wrapper, options 
TSRMLS_CC, Invalid login %s, resource-user);
+   goto connect_errexit;
+   }
+   s++;
+   }
+   
php_stream_write_string(stream, resource-user);
} else {
php_stream_write_string(stream, anonymous);

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



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

2005-05-06 Thread Ilia Alshanetsky
iliaa   Fri May  6 14:42:53 2005 EDT

  Modified files:  
/php-src/ext/standard   ftp_fopen_wrapper.c 
  Log:
  Check ftp user name for control characters.
  
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.80r2=1.81ty=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.80 
php-src/ext/standard/ftp_fopen_wrapper.c:1.81
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.80   Sun Feb 27 12:08:18 2005
+++ php-src/ext/standard/ftp_fopen_wrapper.cFri May  6 14:42:52 2005
@@ -18,7 +18,7 @@
|  Sara Golemon [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.80 2005/02/27 17:08:18 iliaa Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.81 2005/05/06 18:42:52 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -208,7 +208,20 @@
/* send the user name */
php_stream_write_string(stream, USER );
if (resource-user != NULL) {
-   php_raw_url_decode(resource-user, strlen(resource-user));
+   unsigned char *s, *e;
+   int user_len = php_raw_url_decode(resource-user, 
strlen(resource-user));
+   
+   s = resource-user;
+   e = s + user_len;
+   /* check for control characters that should not be present in 
the user name */
+   while (s  e) {
+   if (iscntrl(*s)) {
+   php_stream_wrapper_log_error(wrapper, options 
TSRMLS_CC, Invalid login %s, resource-user);
+   goto connect_errexit;
+   }
+   s++;
+   }
+   
php_stream_write_string(stream, resource-user);
} else {
php_stream_write_string(stream, anonymous);

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard ftp_fopen_wrapper.c

2005-05-06 Thread Ilia Alshanetsky
iliaa   Fri May  6 14:43:31 2005 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/standard   ftp_fopen_wrapper.c 
  Log:
  MFH: Check ftp user name for control characters.
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/ftp_fopen_wrapper.c?r1=1.38.2.6r2=1.38.2.7ty=u
Index: php-src/ext/standard/ftp_fopen_wrapper.c
diff -u php-src/ext/standard/ftp_fopen_wrapper.c:1.38.2.6 
php-src/ext/standard/ftp_fopen_wrapper.c:1.38.2.7
--- php-src/ext/standard/ftp_fopen_wrapper.c:1.38.2.6   Mon Aug 25 18:26:37 2003
+++ php-src/ext/standard/ftp_fopen_wrapper.cFri May  6 14:43:31 2005
@@ -17,7 +17,7 @@
|  Hartmut Holzgraefe [EMAIL PROTECTED]   |
+--+
  */
-/* $Id: ftp_fopen_wrapper.c,v 1.38.2.6 2003/08/25 22:26:37 pollita Exp $ */
+/* $Id: ftp_fopen_wrapper.c,v 1.38.2.7 2005/05/06 18:43:31 iliaa Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -246,7 +246,20 @@
/* send the user name */
php_stream_write_string(stream, USER );
if (resource-user != NULL) {
-   php_raw_url_decode(resource-user, strlen(resource-user));
+   unsigned char *s, *e;
+   int user_len = php_raw_url_decode(resource-user, 
strlen(resource-user));
+   
+   s = resource-user;
+   e = s + user_len;
+   /* check for control characters that should not be present in 
the user name */
+   while (s  e) {
+   if (iscntrl(*s)) {
+   php_stream_wrapper_log_error(wrapper, options 
TSRMLS_CC, Invalid login %s, resource-user);
+   goto connect_errexit;
+   }
+   s++;
+   }
+   
php_stream_write_string(stream, resource-user);
} else {
php_stream_write_string(stream, anonymous);

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



[PHP-CVS] cvs: php-src /ext/sqlite config.m4

2005-05-06 Thread Jani Taskinen
sniper  Fri May  6 18:51:05 2005 EDT

  Modified files:  
/php-src/ext/sqlite config.m4 
  Log:
  cleanup
  
http://cvs.php.net/diff.php/php-src/ext/sqlite/config.m4?r1=1.33r2=1.34ty=u
Index: php-src/ext/sqlite/config.m4
diff -u php-src/ext/sqlite/config.m4:1.33 php-src/ext/sqlite/config.m4:1.34
--- php-src/ext/sqlite/config.m4:1.33   Fri Apr 15 20:04:27 2005
+++ php-src/ext/sqlite/config.m4Fri May  6 18:51:05 2005
@@ -1,79 +1,69 @@
-dnl $Id: config.m4,v 1.33 2005/04/16 00:04:27 rasmus Exp $
+dnl $Id: config.m4,v 1.34 2005/05/06 22:51:05 sniper Exp $
 dnl config.m4 for extension sqlite
 dnl vim:et:ts=2:sw=2
 
-PHP_ARG_ENABLE(sqlite-utf8, whether to enable UTF-8 support in sqlite 
(default: ISO-8859-1),
-[  --enable-sqlite-utf8Enable UTF-8 support for SQLite], no, no)
-
 PHP_ARG_WITH(sqlite, for sqlite support,
 [  --without-sqlite  Do not include sqlite support.
   Use --with-sqlite=DIR to specify DIR where
   Sqlite include and library files are located,
   if not using bundled library.], yes)
 
+PHP_ARG_ENABLE(sqlite-utf8, whether to enable UTF-8 support in sqlite 
(default: ISO-8859-1),
+[  --enable-sqlite-utf8Enable UTF-8 support for SQLite], no, no)
+
 if test $PHP_SQLITE != no; then
- if test $PHP_PDO != no; then
-  AC_MSG_CHECKING([for PDO includes])
-  if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
-pdo_inc_path=$abs_srcdir/ext
-  elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
-pdo_inc_path=$abs_srcdir/ext
-  elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
-pdo_inc_path=$prefix/include/php/ext
-  else
-AC_MSG_WARN([Cannot find php_pdo_driver.h.])
-pdo_inc_path=
-  fi
-  if test -n $pdo_inc_path; then
-AC_DEFINE([PHP_SQLITE2_HAVE_PDO], [1], [Have PDO])
-pdo_inc_path=-I$pdo_inc_path
-  fi
-  AC_MSG_RESULT($pdo_inc_path)
- fi  
+  if test $PHP_PDO != no; then
+AC_MSG_CHECKING([for PDO includes])
+if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
+  pdo_inc_path=$abs_srcdir/ext
+elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
+  pdo_inc_path=$abs_srcdir/ext
+elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
+  pdo_inc_path=$prefix/include/php/ext
+else
+  AC_MSG_WARN([Cannot find php_pdo_driver.h.])
+fi
+if test -n $pdo_inc_path; then
+  AC_DEFINE([PHP_SQLITE2_HAVE_PDO], [1], [Have PDO])
+  pdo_inc_path=-I$pdo_inc_path
+fi
+AC_MSG_RESULT([$pdo_inc_path])
+  fi  
 
   if test $PHP_SQLITE != yes; then
 SEARCH_PATH=/usr/local /usr
 SEARCH_FOR=/include/sqlite.h
 if test -r $PHP_SQLITE/; then # path given as parameter
-SQLITE_DIR=$PHP_SQLITE
+  SQLITE_DIR=$PHP_SQLITE
 else # search default path list
-AC_MSG_CHECKING([for sqlite files in default path])
-for i in $SEARCH_PATH ; do
+  AC_MSG_CHECKING([for sqlite files in default path])
+  for i in $SEARCH_PATH ; do
 if test -r $i/$SEARCH_FOR; then
-SQLITE_DIR=$i
-AC_MSG_RESULT(found in $i)
+  SQLITE_DIR=$i
+  AC_MSG_RESULT(found in $i)
 fi
-done
+  done
 fi
   
 if test -z $SQLITE_DIR; then
-AC_MSG_RESULT([not found])
-AC_MSG_ERROR([Please reinstall the sqlite distribution from 
http://www.sqlite.org])
+  AC_MSG_RESULT([not found])
+  AC_MSG_ERROR([Please reinstall the sqlite distribution from 
http://www.sqlite.org])
 fi
 
-PHP_ADD_INCLUDE($SQLITE_DIR/include)
-
-LIBNAME=sqlite
-LIBSYMBOL=sqlite_open
-
-PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
-[
-PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SQLITE_DIR/$PHP_LIBDIR, 
SQLITE_SHARED_LIBADD)
-AC_DEFINE(HAVE_SQLITELIB,1,[ ])
+PHP_CHECK_LIBRARY(sqlite, sqlite_open, [
+  PHP_ADD_LIBRARY_WITH_PATH(sqlite, $SQLITE_DIR/$PHP_LIBDIR, 
SQLITE_SHARED_LIBADD)
+  PHP_ADD_INCLUDE($SQLITE_DIR/include)
 ],[
-AC_MSG_ERROR([wrong sqlite lib version or lib not found])
+  AC_MSG_ERROR([wrong sqlite lib version or lib not found])
 ],[
--L$SQLITE_DIR/$PHP_LIBDIR -lm
+  -L$SQLITE_DIR/$PHP_LIBDIR -lm
 ])
- 
-PHP_SUBST(SQLITE_SHARED_LIBADD)
-PHP_NEW_EXTENSION(sqlite, sqlite.c sess_sqlite.c pdo_sqlite2.c 
libsqlite/src/encode.c, $ext_shared,,$pdo_inc_path)
+PHP_SQLITE_CFLAGS=$pdo_inc_path
+sqlite_extra_sources=libsqlite/src/encode.c
   else
 # use bundled library
-
 PHP_SQLITE_CFLAGS=[EMAIL PROTECTED]@/libsqlite/src $pdo_inc_path
-
-sources=libsqlite/src/opcodes.c
+sqlite_extra_sources=libsqlite/src/opcodes.c \
 libsqlite/src/parse.c libsqlite/src/encode.c \
 libsqlite/src/auth.c libsqlite/src/btree.c libsqlite/src/build.c \
 libsqlite/src/delete.c libsqlite/src/expr.c libsqlite/src/func.c \
@@ -87,30 +77,29 @@
 libsqlite/src/vdbeaux.c libsqlite/src/date.c \
 

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

2005-05-06 Thread Jani Taskinen
sniper  Fri May  6 18:58:43 2005 EDT

  Modified files:  
/php-src/ext/pdoconfig.m4 
  Log:
  Only test stuff if PDO is enabled
  
http://cvs.php.net/diff.php/php-src/ext/pdo/config.m4?r1=1.10r2=1.11ty=u
Index: php-src/ext/pdo/config.m4
diff -u php-src/ext/pdo/config.m4:1.10 php-src/ext/pdo/config.m4:1.11
--- php-src/ext/pdo/config.m4:1.10  Thu Feb 17 20:39:36 2005
+++ php-src/ext/pdo/config.m4   Fri May  6 18:58:42 2005
@@ -1,19 +1,20 @@
-dnl $Id: config.m4,v 1.10 2005/02/18 01:39:36 wez Exp $
+dnl $Id: config.m4,v 1.11 2005/05/06 22:58:42 sniper Exp $
 dnl config.m4 for extension pdo
 dnl vim:se ts=2 sw=2 et:
 
-pdo_running_under_pear=0
-case `pwd` in
-  /var/tmp/pear-build-*)
-pdo_running_under_pear=1
-;;
-esac
-
-if test $pdo_running_under_pear$PHP_PEAR_VERSION = 1; then
-  # we're running in an environment that smells like pear,
-  # and the PHP_PEAR_VERSION env var is not set.  That implies
-  # that we're running under a slightly broken pear installer
-  AC_MSG_ERROR([
+AC_DEFUN([PHP_PDO_PEAR_CHECK],[
+  pdo_running_under_pear=0
+  case `pwd` in
+/var/tmp/pear-build-*)
+  pdo_running_under_pear=1
+  ;;
+  esac
+
+  if test $pdo_running_under_pear$PHP_PEAR_VERSION = 1; then
+# we're running in an environment that smells like pear,
+# and the PHP_PEAR_VERSION env var is not set.  That implies
+# that we're running under a slightly broken pear installer
+AC_MSG_ERROR([
 PDO requires that you upgrade your PEAR installer tools. Please
 do so now by running:
 
@@ -22,13 +23,17 @@
 or by manually downloading and installing PEAR version 1.3.5 or higher.
 
 Once you've upgraded, please re-try your PDO install.
+])
+  fi
 ])
-fi
 
 PHP_ARG_ENABLE(pdo, whether to enable PDO support,
 [  --enable-pdo=yes Enable PHP Data Objects support (recommended)], 
yes)
 
 if test $PHP_PDO != no; then
+
+  PHP_PDO_PEAR_CHECK
+
   if test $ext_shared = yes ; then
 case $host_alias in
   *darwin*)

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



[PHP-CVS] cvs: php-src / Makefile.global acinclude.m4 configure.in /ext/curl config.m4 /ext/dom config.m4 /ext/iconv config.m4 /ext/interbase php_ibase_udf.c /ext/libxml config0.m4 /ext/mbstring

2005-05-06 Thread Jani Taskinen
sniper  Fri May  6 22:51:54 2005 EDT

  Removed files:   
/php-src/ext/pdoMakefile.frag 

  Modified files:  
/php-srcMakefile.global acinclude.m4 configure.in 
/php-src/ext/curl   config.m4 
/php-src/ext/domconfig.m4 
/php-src/ext/iconv  config.m4 
/php-src/ext/interbase  php_ibase_udf.c 
/php-src/ext/libxml config0.m4 
/php-src/ext/mbstring   config.m4 
/php-src/ext/odbc   config.m4 
/php-src/ext/pdoconfig.m4 
/php-src/ext/pdo_sqlite .cvsignore config.m4 
/php-src/ext/pdo_sqlite/sqlite/src  .cvsignore 
/php-src/ext/sessionconfig.m4 
/php-src/ext/sqlite config.m4 
/php-src/ext/xmlconfig.m4 
/php-src/sapi/embed config.m4 
/php-src/scriptsMakefile.frag phpize.m4 
  Log:
  - Added PHP_INSTALL_HEADERS() macro
  - Fixed several VPATH build issues
  - Changed all awk calls to use $AWK
  - Changed all mkdir calls to use $php_shtool mkdir
  
  http://cvs.php.net/diff.php/php-src/Makefile.global?r1=1.51r2=1.52ty=u
Index: php-src/Makefile.global
diff -u php-src/Makefile.global:1.51 php-src/Makefile.global:1.52
--- php-src/Makefile.global:1.51Thu Dec  4 10:57:55 2003
+++ php-src/Makefile.global Fri May  6 22:51:50 2005
@@ -5,6 +5,8 @@
 DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main 
-I$(top_srcdir)
 COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) 
$(PHP_FRAMEWORKPATH)
 
+CORE_HEADERS = Zend/ TSRM/ include/ main/ main/streams/ regex/ ext/standard/
+INSTALL_HEADERS = $(CORE_HEADERS) $(INSTALL_EXT_HEADERS)
 
 all: $(all_targets) 
@echo
http://cvs.php.net/diff.php/php-src/acinclude.m4?r1=1.305r2=1.306ty=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.305 php-src/acinclude.m4:1.306
--- php-src/acinclude.m4:1.305  Sat Apr 30 05:29:09 2005
+++ php-src/acinclude.m4Fri May  6 22:51:50 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: acinclude.m4,v 1.305 2005/04/30 09:29:09 sniper Exp $
+dnl $Id: acinclude.m4,v 1.306 2005/05/07 02:51:50 sniper Exp $
 dnl
 dnl This file contains local autoconf functions.
 dnl
@@ -138,7 +138,7 @@
 dnl
 AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
 AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
-test -d include || mkdir include
+test -d include || $php_shtool mkdir include
  Makefile.objects
  Makefile.fragments
 dnl We need to play tricks here to avoid matching the grep line itself
@@ -901,7 +901,11 @@
 ])
 
 AC_DEFUN([PHP_ADD_BUILD_DIR],[
-  BUILD_DIR=$BUILD_DIR $1
+  ifelse($2,,[
+BUILD_DIR=$BUILD_DIR $1
+  ], [
+$php_shtool mkdir -p $1
+  ])
 ])
 
 AC_DEFUN([PHP_GEN_BUILD_DIRS],[
@@ -919,13 +923,13 @@
 dnl shared can be set to shared or yes to build the extension as
 dnl a dynamically loadable library. Optional parameter sapi_class can
 dnl be set to cli to mark extension build only with CLI or CGI sapi's.
-dnl extra-cflags are passed to the compiler, with @ext_srcdir@ being
-dnl substituted.
+dnl extra-cflags are passed to the compiler, with 
+dnl @ext_srcdir@ and @ext_builddir@ being substituted.
 AC_DEFUN([PHP_NEW_EXTENSION],[
   ext_builddir=[]PHP_EXT_BUILDDIR($1)
   ext_srcdir=[]PHP_EXT_SRCDIR($1)
 
-  ifelse($5,,ac_extra=,[ac_extra=`echo $5|sed [EMAIL 
PROTECTED]@#$ext_srcdir#g`])
+  ifelse($5,,ac_extra=,[ac_extra=`echo $5|sed [EMAIL 
PROTECTED]@#$ext_srcdir#g|sed [EMAIL PROTECTED]@#$ext_builddir#g`])
 
   if test $3 != shared  test $3 != yes  test $4 != cli; then
 dnl -- Static module
@@ -2345,6 +2349,29 @@
 dnl Misc. macros
 dnl -
 
+dnl 
+dnl PHP_INSTALL_HEADERS(path [, file ...])
+dnl
+dnl PHP header files to be installed
+dnl
+AC_DEFUN([PHP_INSTALL_HEADERS],[
+  if test -z $2; then
+for header_file in $1; do
+  PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
+INSTALL_EXT_HEADERS=$INSTALL_EXT_HEADERS $header_file
+  ])
+done 
+  else
+header_path=$1
+for header_file in $2; do
+  hp_hf=$header_path/$header_file
+  PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
+INSTALL_EXT_HEADERS=$INSTALL_EXT_HEADERS $hp_hf
+  ])
+done 
+  fi
+])
+
 dnl
 dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
 dnl
http://cvs.php.net/diff.php/php-src/configure.in?r1=1.552r2=1.553ty=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.552 php-src/configure.in:1.553
--- php-src/configure.in:1.552  Sat Apr 30 00:27:23 2005
+++ php-src/configure.inFri May  6 22:51:50 2005
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.552 2005/04/30 04:27:23 sniper Exp $ -*- autoconf 
-*-
+dnl ## $Id: configure.in,v 1.553 2005/05/07 02:51:50 sniper Exp $ -*- autoconf 
-*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -1122,6 +1122,7 @@
 PHP_SUBST(PHP_FRAMEWORKS)
 PHP_SUBST(PHP_FRAMEWORKPATH)
 PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
+PHP_SUBST(INSTALL_EXT_HEADERS)
 
 old_CC=$CC
 

[PHP-CVS] cvs: php-src /ext/gd config.m4

2005-05-06 Thread Jani Taskinen
sniper  Fri May  6 23:19:44 2005 EDT

  Modified files:  
/php-src/ext/gd config.m4 
  Log:
  - Install GD header files
  
http://cvs.php.net/diff.php/php-src/ext/gd/config.m4?r1=1.151r2=1.152ty=u
Index: php-src/ext/gd/config.m4
diff -u php-src/ext/gd/config.m4:1.151 php-src/ext/gd/config.m4:1.152
--- php-src/ext/gd/config.m4:1.151  Tue Jan  4 01:51:44 2005
+++ php-src/ext/gd/config.m4Fri May  6 23:19:42 2005
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.151 2005/01/04 06:51:44 sniper Exp $
+dnl $Id: config.m4,v 1.152 2005/05/07 03:19:42 sniper Exp $
 dnl
 
 dnl
@@ -410,7 +410,9 @@
   if test $GD_MODULE_TYPE = builtin; then
 GDLIB_CFLAGS=-I$ext_srcdir/libgd $GDLIB_CFLAGS
 PHP_ADD_BUILD_DIR($ext_builddir/libgd)
+GD_HEADER_DIRS=ext/gd/ ext/gd/libgd/
   else
+GD_HEADER_DIRS=ext/gd/
 GDLIB_CFLAGS=-I$GD_INCLUDE $GDLIB_CFLAGS
 PHP_ADD_INCLUDE($GD_INCLUDE)
   
@@ -419,6 +421,7 @@
 ], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   fi
 
+  PHP_INSTALL_HEADERS([$GD_HEADER_DIRS])
   PHP_SUBST(GDLIB_CFLAGS)
   PHP_SUBST(GD_SHARED_LIBADD)
 fi

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