[security] Only save debugging output when we are debugging.

This commit is contained in:
Andrew McMillan 2007-05-19 11:43:50 +12:00
parent f00f07eb8f
commit 4872988f2e
2 changed files with 11 additions and 3 deletions

View File

@ -14,9 +14,11 @@ if ( ! $request->AllowedTo("read") ) {
$request->DoResponse(403);
}
$fh = fopen('/tmp/PUT.txt','w');
fwrite($fh,$request->raw_post);
fclose($fh);
if ( isset($c->dbg['ALL']) || $c->dbg['put'] ) {
$fh = fopen('/tmp/PUT.txt','w');
fwrite($fh,$request->raw_post);
fclose($fh);
}
include_once('caldav-PUT-functions.php');
$is_collection = controlRequestContainer($request->username,$request->user_no, $request->path,true);

View File

@ -10,6 +10,12 @@
*/
dbg_error_log("REPORT", "method handler");
if ( isset($c->dbg['ALL']) || $c->dbg['report'] ) {
$fh = fopen('/tmp/REPORT.txt','w');
fwrite($fh,$request->raw_post);
fclose($fh);
}
if ( ! ($request->AllowedTo('read') || $request->AllowedTo('freebusy')) ) {
// The specification states that a lack of privileges MUST result in a 404. Caldav-15, Section 7.10, p66
$request->DoResponse( 404 );