Preload existence of the three links commonly needed from the skin, thus reducing...
[lhc/web/wiklou.git] / img_auth.php
index 341b7e2..fb58ba2 100644 (file)
@@ -1,17 +1,18 @@
 <?php
 /**
  * Image download authorisation script
- * 
+ *
  * To use, in LocalSettings.php set $wgUploadDirectory to point to a non-public
  * directory, and $wgUploadPath to point to this file. Also set $wgWhitelistRead
  * to an array of pages you want everyone to be able to access. Your server must
- * support PATH_INFO, CGI-based configurations generally don't. 
+ * support PATH_INFO, CGI-based configurations generally don't.
  */
 # Valid web server entry point, enable includes
 define( 'MEDIAWIKI', true );
 
 if ( isset( $_REQUEST['GLOBALS'] ) ) {
-       die( '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>');
+       echo '<a href="http://www.hardened-php.net/index.76.html">$GLOBALS overwrite vulnerability</a>';
+       die( -1 );
 }
 
 require_once( 'includes/Defines.php' );
@@ -49,7 +50,7 @@ wfStreamFile( $filename );
 
 function wfForbidden() {
        header( 'HTTP/1.0 403 Forbidden' );
-       print 
+       print
 "<html><body>
 <h1>Access denied</h1>
 <p>You need to log in to access files on this server</p>