r70873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70872‎ | r70873 | r70874 >
Date:12:21, 11 August 2010
Author:demon
Status:ok
Tags:
Comment:
Use WebRequest here too
Modified paths:
  • /trunk/phase3/img_auth.php (modified) (history)

Diff [purge]

Index: trunk/phase3/img_auth.php
@@ -39,10 +39,12 @@
4040
4141 // Extract path and image information
4242 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+ }
4547 } else {
46 - $path = $_SERVER['PATH_INFO'];
 48+ $path = $_SERVER['PATH_INFO'];
4749 }
4850
4951 $filename = realpath( $wgUploadDirectory . '/' . $path );

Status & tagging log