phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.vfs_sql.inc.php,1.15.2.6,1.1


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.vfs_sql.inc.php,1.15.2.6,1.15.2.7
Date: Wed, 02 Jul 2003 20:19:43 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv3439

Modified Files:
      Tag: Version-0_9_14-branch
        class.vfs_sql.inc.php 
Log Message:
test against files-dir within the document-root of the webserver
(this would allow uploads of scripts via vfs, and then execute them via the 
webserver)

Index: class.vfs_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.vfs_sql.inc.php,v
retrieving revision 1.15.2.6
retrieving revision 1.15.2.7
diff -C2 -r1.15.2.6 -r1.15.2.7
*** class.vfs_sql.inc.php       24 Jun 2002 03:51:43 -0000      1.15.2.6
--- class.vfs_sql.inc.php       3 Jul 2003 00:19:40 -0000       1.15.2.7
***************
*** 101,104 ****
--- 101,117 ----
                {
                        $this->basedir = 
$GLOBALS['phpgw_info']['server']['files_dir'];
+                       
+                       // test if the files-dir is inside the document-root, 
and refuse working if so
+                       //
+                       if (strstr($this->basedir,PHPGW_SERVER_ROOT) || 
strstr($this->basedir,$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']))
+                       {
+                               $GLOBALS['phpgw']->common->phpgw_header();
+                               if 
($GLOBALS['phpgw_info']['flags']['noheader']) 
+                               {
+                                       echo parse_navbar();
+                               }
+                               echo '<p align="center"><font 
color="red"><b>'.lang('Path to user and group files HAS TO BE OUTSIDE of the 
webservers document-root!!!')."</b></font></p>\n";
+                               $GLOBALS['phpgw']->common->phpgw_exit();
+                       }
                        $this->fakebase = "/home";
                        $this->working_id = 
$GLOBALS['phpgw_info']['user']['account_id'];





reply via email to

[Prev in Thread] Current Thread [Next in Thread]