Last modified: 2013-09-04 11:49:50 UTC
Try to get the image [[Datei:File.jpg|thumb|300px]] through img_auth.php: http://localhost/mediawiki-1.17/img_auth.php/thumb/4/42/File.jpg/300px-File.jpg r89627 works. r89628 doesn't work: <h1>Forbidden</h1><p>Invalid file extension found in the path info or query string.</p> LocalSettings.php: $wgScriptPath = "/mediawiki-1.17"; $wgUploadPath = "$wgScriptPath/img_auth.php";
*** This bug has been marked as a duplicate of bug 28840 ***
Can you please add the following at the top of img_auth.php: var_dump( $_SERVER ); exit; And then request that same failing URL and paste the output into a comment?
Created attachment 8714 [details] Output with var_dump( $_SERVER ); in img_auth.php The requested file is in /apps/www/images/thumb/4/42/File.jpg/300px-File.jpg LocalSettings.php $wgUploadDirectory = "/apps/www/images"; May be img_auth.php tries to access the wrong path /srv/www/htdocs/thumb/4/42/File.jpg/300px-File.jpg from PATH_TRANSLATED. Before r89628 the same configuration worked correctly.
Try changing the strpos() in img_auth.php to strrpos(). Here's a patch file for it if you prefer: Index: img_auth.php =================================================================== --- img_auth.php (revision 90644) +++ img_auth.php (working copy) @@ -46,7 +46,7 @@ $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 );
(In reply to comment #4) > Try changing the strpos() in img_auth.php to strrpos(). Yes. With strrpos() it works again.
r91153