[Openfirst-cvscommit] members web.php,1.3,1.4
Brought to you by:
xtimg
From: <xt...@us...> - 2004-01-21 00:00:16
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv6965 Modified Files: web.php Log Message: Add checking to make sure a uri is specified. Fixes bugs #44, 45 Index: web.php =================================================================== RCS file: /cvsroot/openfirst/members/web.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** web.php 23 Nov 2003 19:07:28 -0000 1.3 --- web.php 21 Jan 2004 00:00:12 -0000 1.4 *************** *** 29,32 **** --- 29,33 ---- echo("<p><strong>Disclaimer:</strong> This page is not maintained by the administration of the rest of the site. The opinions and views expressed here are those of the author and are not necessarily the views and opinions of the administration.</p>"); + if(! isset($_GET["uri"])) { die("There is no page matching your request."); } $user = substr($_GET["uri"],1, strpos($_GET["uri"], "/", 2) - 1); *************** *** 34,41 **** $vfs = ofirst_dbfetch_object(ofirst_dbquery("SELECT virtfspath FROM ofirst_workspace_users WHERE user='$user';")); $vfs = $vfs->virtfspath . "www/"; ! if(substr($file, -1, 1) == "/") { $file .= "index.html"; } ! if($file == "") { $file .= "index.html"; } ! if ($fd = fopen ($vfs . $file, "rb")) { ! fpassthru($fd); ! } ?> --- 35,42 ---- $vfs = ofirst_dbfetch_object(ofirst_dbquery("SELECT virtfspath FROM ofirst_workspace_users WHERE user='$user';")); $vfs = $vfs->virtfspath . "www/"; ! if(substr($file, -1, 1) == "/") { $file .= "index.html"; } ! if($file == "") { $file .= "index.html"; } ! if ($fd = fopen ($vfs . $file, "rb")) { ! fpassthru($fd); ! } ?> |