comparison contrib/web/php-admin/htdocs/edit.php @ 762:dbb144f085a5

Fix php-admin to work when topdir contains a symlink (e.g. on Mac)
author Ben Schmidt
date Mon, 18 Oct 2010 09:59:24 +1100
parents 73c8715367fb
children 4be42e1ca045
comparison
equal deleted inserted replaced
761:4bf5317e9bd7 762:dbb144f085a5
102 $list = $HTTP_GET_VARS["list"]; 102 $list = $HTTP_GET_VARS["list"];
103 103
104 if(!isset($list)) 104 if(!isset($list))
105 die("no list specified"); 105 die("no list specified");
106 106
107 if (dirname(realpath($topdir."/".$list)) != $topdir) 107 if (dirname(realpath($topdir."/".$list)) != realpath($topdir))
108 die("list outside topdir"); 108 die("list outside topdir");
109 109
110 if(!is_dir($topdir."/".$list)) 110 if(!is_dir($topdir."/".$list))
111 die("non-existent list"); 111 die("non-existent list");
112 112