Index: trunk/phase3/img_auth.php |
— | — | @@ -56,6 +56,10 @@ |
57 | 57 | |
58 | 58 | // Get the requested file path (source file or thumbnail) |
59 | 59 | $matches = WebRequest::getPathInfo(); |
| 60 | + if ( !isset( $matches['title'] ) ) { |
| 61 | + wfForbidden( 'img-auth-accessdenied', 'img-auth-nopathinfo' ); |
| 62 | + return; |
| 63 | + } |
60 | 64 | $path = $matches['title']; |
61 | 65 | if ( $path && $path[0] !== '/' ) { |
62 | 66 | // Make sure $path has a leading / |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2295,7 +2295,7 @@ |
2296 | 2296 | 'img-auth-nopathinfo' => 'Missing PATH_INFO. |
2297 | 2297 | Your server is not set up to pass this information. |
2298 | 2298 | It may be CGI-based and cannot support img_auth. |
2299 | | -[//www.mediawiki.org/wiki/Manual:Image_Authorization See image authorization.]', |
| 2299 | +See http://www.mediawiki.org/wiki/Manual:Image_Authorization.', |
2300 | 2300 | 'img-auth-notindir' => 'Requested path is not in the configured upload directory.', |
2301 | 2301 | 'img-auth-badtitle' => 'Unable to construct a valid title from "$1".', |
2302 | 2302 | 'img-auth-nologinnWL' => 'You are not logged in and "$1" is not in the whitelist.', |