diff options
Diffstat (limited to 'img_auth.php')
-rw-r--r-- | img_auth.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/img_auth.php b/img_auth.php index bc4464d4..534d1fd2 100644 --- a/img_auth.php +++ b/img_auth.php @@ -37,6 +37,13 @@ if ( $wgImgAuthPublicTest wfForbidden('img-auth-accessdenied','img-auth-public'); } +// Check for bug 28235: QUERY_STRING overriding the correct extension +if ( isset( $_SERVER['QUERY_STRING'] ) + && preg_match( '/\.[a-z]{1,4}$/i', $_SERVER['QUERY_STRING'] ) ) +{ + wfForbidden( 'img-auth-accessdenied', 'img-auth-bad-query-string' ); +} + // Extract path and image information if( !isset( $_SERVER['PATH_INFO'] ) ) wfForbidden('img-auth-accessdenied','img-auth-nopathinfo'); |