iliaa Wed Feb 2 18:44:08 2005 EDT
Modified files: (Branch: PHP_4_3)
/php-src NEWS
/php-src/main fopen_wrappers.c
Log:
MFH: Fixed bug #31514 (open_basedir uses path_translated rather then cwd for .
translation).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.824&r2=1.1247.2.825&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.824 php-src/NEWS:1.1247.2.825
--- php-src/NEWS:1.1247.2.824 Tue Feb 1 18:29:01 2005
+++ php-src/NEWS Wed Feb 2 18:44:07 2005
@@ -14,6 +14,8 @@
- Fixed bug #31623 (OCILogin does not support password grace period).
(daniel dot beet at accuratesoftware dot com, Tony)
- Fixed bug #31580 (fgetcsv() problematic with "" escape sequences). (Ilia)
+- Fixed bug #31514 (open_basedir uses path_translated rather then cwd for .
+ translation). (Ilia)
- Fixed bug #31480 (Possible infinite loop in imap_mail_compose()). (Ilia)
- Fixed bug #31479 (Fixed crash in chunk_split(), when chunklen > strlen).
(Ilia)
- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
http://cvs.php.net/diff.php/php-src/main/fopen_wrappers.c?r1=1.153.2.9&r2=1.153.2.10&ty=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.153.2.9
php-src/main/fopen_wrappers.c:1.153.2.10
--- php-src/main/fopen_wrappers.c:1.153.2.9 Mon Mar 15 19:32:09 2004
+++ php-src/main/fopen_wrappers.c Wed Feb 2 18:44:07 2005
@@ -16,7 +16,7 @@
| Jim Winstead <[EMAIL PROTECTED]>
|
+----------------------------------------------------------------------+
*/
-/* $Id: fopen_wrappers.c,v 1.153.2.9 2004/03/16 00:32:09 iliaa Exp $ */
+/* $Id: fopen_wrappers.c,v 1.153.2.10 2005/02/02 23:44:07 iliaa Exp $ */
/* {{{ includes
*/
@@ -106,24 +106,11 @@
char resolved_name[MAXPATHLEN];
char resolved_basedir[MAXPATHLEN];
char local_open_basedir[MAXPATHLEN];
- int local_open_basedir_pos;
int resolved_basedir_len;
int resolved_name_len;
/* Special case basedir==".": Use script-directory */
- if ((strcmp(basedir, ".") == 0) &&
- SG(request_info).path_translated &&
- *SG(request_info).path_translated
- ) {
- strlcpy(local_open_basedir, SG(request_info).path_translated,
sizeof(local_open_basedir));
- local_open_basedir_pos = strlen(local_open_basedir) - 1;
-
- /* Strip filename */
- while (!IS_SLASH(local_open_basedir[local_open_basedir_pos])
- && (local_open_basedir_pos >= 0)) {
- local_open_basedir[local_open_basedir_pos--] = 0;
- }
- } else {
+ if (strcmp(basedir, ".") || !VCWD_GETCWD(local_open_basedir,
MAXPATHLEN)) {
/* Else use the unmodified path */
strlcpy(local_open_basedir, basedir,
sizeof(local_open_basedir));
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php