phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: infolog/inc class.vfs.inc.php,1.7,1.8


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: infolog/inc class.vfs.inc.php,1.7,1.8
Date: Wed, 02 Jul 2003 20:33:29 -0400

Update of /cvsroot/phpgroupware/infolog/inc
In directory subversions:/tmp/cvs-serv9498

Modified Files:
        class.vfs.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.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/inc/class.vfs.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.vfs.inc.php   20 Oct 2002 15:05:50 -0000      1.7
--- class.vfs.inc.php   3 Jul 2003 00:33:26 -0000       1.8
***************
*** 100,103 ****
--- 100,116 ----
                {
                        $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]