Index: trunk/phase3/img_auth.php |
— | — | @@ -39,10 +39,12 @@ |
40 | 40 | |
41 | 41 | // Extract path and image information |
42 | 42 | if( !isset( $_SERVER['PATH_INFO'] ) ) { |
43 | | - if( isset( $_GET['path'] ) ) $path = $_GET['path']; |
44 | | - else wfForbidden('img-auth-accessdenied','img-auth-nopathinfo'); |
| 43 | + $path = $wgRequest->getText( 'path' ); |
| 44 | + if( !$path ) { |
| 45 | + wfForbidden( 'img-auth-accessdenied', 'img-auth-nopathinfo' ); |
| 46 | + } |
45 | 47 | } else { |
46 | | - $path = $_SERVER['PATH_INFO']; |
| 48 | + $path = $_SERVER['PATH_INFO']; |
47 | 49 | } |
48 | 50 | |
49 | 51 | $filename = realpath( $wgUploadDirectory . '/' . $path ); |