From d81f562b712f2387fa02290bf2ca86392ab356f2 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 20:21:25 +0000 Subject: Aktualisierung auf Version 1.8.1 --- includes/StreamFile.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'includes/StreamFile.php') diff --git a/includes/StreamFile.php b/includes/StreamFile.php index 83417185..81538a84 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -6,10 +6,12 @@ function wfStreamFile( $fname ) { $stat = @stat( $fname ); if ( !$stat ) { header( 'HTTP/1.0 404 Not Found' ); + $encFile = htmlspecialchars( $fname ); + $encScript = htmlspecialchars( $_SERVER['SCRIPT_NAME'] ); echo "

File not found

-

Although this PHP script ({$_SERVER['SCRIPT_NAME']}) exists, the file requested for output -does not.

+

Although this PHP script ($encScript) exists, the file requested for output +($encFile) does not.

"; return; } @@ -64,7 +66,7 @@ function wfGetType( $filename ) { return 'unknown/unknown'; } else { - $magic=& wfGetMimeMagic(); + $magic=& MimeMagic::singleton(); return $magic->guessMimeType($filename); //full fancy mime detection } } -- cgit v1.2.3-54-g00ecf