CVS update: php3
| From: | steffann | Date: | Wed, 09 Jun 1999 00:16:00 +0000 |
| Subject: | CVS update: php3 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6738@lists.php.net to get a copy of this message | ||
Date: Tuesday June 8, 1999 @ 20:16
Author: steffann
Update of /repository/php3
In directory php:/tmp/cvs-serv13565
Modified Files:
ChangeLog fopen-wrappers.c
Log Message:
open_basedir now resolves symlinks in the configuration.
Solves bug #1507
Index: php3/ChangeLog
diff -u php3/ChangeLog:1.670 php3/ChangeLog:1.671
--- php3/ChangeLog:1.670 Mon Jun 7 13:35:04 1999
+++ php3/ChangeLog Tue Jun 8 20:16:00 1999
@@ -1,6 +1,7 @@
PHP 3.0 CHANGE LOG ChangeLog
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
???, Version 3.0.10
+- open_basedir now resolves symlinks in the configuration (S. Steffann)
- added 'Z' flag to date(): timezone offset in seconds (C. Viebrock)
- added 'L' flag to date(): 1 if it's a leap year, 0 if it isn't (C. Viebrock)
- fixed 't' flag in date() (J. Ahto)
Index: php3/fopen-wrappers.c
diff -u php3/fopen-wrappers.c:1.61 php3/fopen-wrappers.c:1.62
--- php3/fopen-wrappers.c:1.61 Tue Jun 8 11:02:40 1999
+++ php3/fopen-wrappers.c Tue Jun 8 20:16:00 1999
@@ -27,7 +27,7 @@
| Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.c,v 1.61 1999/06/08 15:02:40 sas Exp $ */
+/* $Id: fopen-wrappers.c,v 1.62 1999/06/09 00:16:00 steffann Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
@@ -109,6 +109,7 @@
PHPAPI int _php3_check_specific_open_basedir(char *basedir, char *path)
{
char resolved_name[MAXPATHLEN];
+ char resolved_basedir[MAXPATHLEN];
char local_open_basedir[MAXPATHLEN];
int local_open_basedir_pos;
@@ -154,12 +155,12 @@
}
/* Resolve the real path into resolved_name */
- if (_php3_realpath(path, resolved_name) != NULL) {
+ if ((_php3_realpath(path, resolved_name) != NULL) && (_php3_realpath(local_open_basedir,
resolved_basedir) != NULL)) {
/* Check the path */
#if WIN32|WINNT
- if (strncasecmp(local_open_basedir, resolved_name, strlen(local_open_basedir)) == 0) {
+ if (strncasecmp(resolved_basedir, resolved_name, strlen(resolved_basedir)) == 0) {
#else
- if (strncmp(local_open_basedir, resolved_name, strlen(local_open_basedir)) == 0) {
+ if (strncmp(resolved_basedir, resolved_name, strlen(resolved_basedir)) == 0) {
#endif
/* File is in the right directory */
return 0;