X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=img_auth.php;h=9b330ce2d4543bf124e60a08a36b167e746208a7;hb=8148f72d4cfebb1cdef2783dc96220cf7bdbc0ae;hp=8ea7b01a7ba65860917c8ce7011e59064e54cf92;hpb=f3f1fcdc2c6b034d832c960301dc8abece5c767f;p=lhc%2Fweb%2Fwiklou.git diff --git a/img_auth.php b/img_auth.php index 8ea7b01a7b..9b330ce2d4 100644 --- a/img_auth.php +++ b/img_auth.php @@ -32,7 +32,6 @@ if ( isset( $_SERVER['MW_COMPILED'] ) ) { require ( dirname( __FILE__ ) . '/includes/WebStart.php' ); } wfProfileIn( 'img_auth.php' ); -require_once( dirname( __FILE__ ) . '/includes/StreamFile.php' ); $wgActionPaths[] = $_SERVER['SCRIPT_NAME']; // See if this is a public Wiki (no protections) @@ -46,7 +45,7 @@ $matches = WebRequest::getPathInfo(); $path = $matches['title']; // Check for bug 28235: QUERY_STRING overriding the correct extension -$dotPos = strpos( $path, '.' ); +$dotPos = strrpos( $path, '.' ); $whitelist = array(); if ( $dotPos !== false ) { $whitelist[] = substr( $path, $dotPos + 1 ); @@ -95,7 +94,7 @@ if( !$title->userCanRead() ) // Stream the requested file wfDebugLog( 'img_auth', "Streaming `".$filename."`." ); -wfStreamFile( $filename, array( 'Cache-Control: private', 'Vary: Cookie' ) ); +StreamFile::stream( $filename, array( 'Cache-Control: private', 'Vary: Cookie' ) ); wfLogProfilingData(); /**