From 5fde23e6acda50246b30675fcf46a490082d30b2 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 11 Aug 2010 12:21:49 +0000 Subject: [PATCH] Use WebRequest here too --- img_auth.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/img_auth.php b/img_auth.php index e8ad6b9599..b99773b776 100644 --- a/img_auth.php +++ b/img_auth.php @@ -39,10 +39,12 @@ if ( $wgImgAuthPublicTest // Extract path and image information if( !isset( $_SERVER['PATH_INFO'] ) ) { - if( isset( $_GET['path'] ) ) $path = $_GET['path']; - else wfForbidden('img-auth-accessdenied','img-auth-nopathinfo'); + $path = $wgRequest->getText( 'path' ); + if( !$path ) { + wfForbidden( 'img-auth-accessdenied', 'img-auth-nopathinfo' ); + } } else { - $path = $_SERVER['PATH_INFO']; + $path = $_SERVER['PATH_INFO']; } $filename = realpath( $wgUploadDirectory . '/' . $path ); -- 2.20.1