From: Neil Kandalgaonkar Date: Wed, 24 Nov 2010 19:05:32 +0000 (+0000) Subject: more debug log messages for errors which have to be cryptic (we don't want people... X-Git-Tag: 1.31.0-rc.0~33744 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=595948117d0daeef8ce9df57435052ec91b2c05c;p=lhc%2Fweb%2Fwiklou.git more debug log messages for errors which have to be cryptic (we don't want people knowing paths on the server) --- diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 8184e932a9..e76c40393c 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -103,7 +103,7 @@ class UploadStash { */ public function stashFile( $path, $data = array(), $key = null ) { if ( ! file_exists( $path ) ) { - wfDebug( "UploadStash: tried to stash file at '$path', but it doesn't exist" ); + wfDebug( "UploadStash: tried to stash file at '$path', but it doesn't exist\n" ); throw new UploadStashBadPathException( "path doesn't exist" ); } $fileProps = File::getPropsFromPath( $path ); @@ -188,11 +188,13 @@ class UploadStashFile extends UnregisteredLocalFile { $repoTempPath = $repo->getZonePath( 'temp' ); if ( ( ! $repo->validateFilename( $path ) ) || ( strpos( $path, $repoTempPath ) !== 0 ) ) { + wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not valid\n" ); throw new UploadStashBadPathException( 'path is not valid' ); } // check if path exists! and is a plain file. if ( ! $repo->fileExists( $path, FileRepo::FILES_ONLY ) ) { + wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not found\n" ); throw new UploadStashFileNotFoundException( 'cannot find path, or not a plain file' ); }