Use require not include when sourcing commandLine.inc, to avoid possible web executio...
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 10 Jun 2009 05:29:40 +0000 (05:29 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 10 Jun 2009 05:29:40 +0000 (05:29 +0000)
maintenance/dumpInterwiki.php
maintenance/findhooks.php
maintenance/fuzz-tester.php
maintenance/rebuildInterwiki.php

index 91cdbe8..f5f22f3 100644 (file)
@@ -12,8 +12,8 @@
 $oldCwd = getcwd();
 
 $optionsWithArgs = array( "o" );
-include_once( "commandLine.inc" );
-include_once( "dumpInterwiki.inc" );
+require( "commandLine.inc" );
+require( "dumpInterwiki.inc" );
 chdir( $oldCwd );
 
 # Output
index d7cad25..64fe9a5 100644 (file)
@@ -21,8 +21,7 @@
  */
 
 /** This is a command line script*/
-include('commandLine.inc');
-
+require('commandLine.inc');
 # GLOBALS
 
 $doc = $IP . '/docs/hooks.txt';
@@ -156,4 +155,4 @@ printArray('not found', $deprecated );
 printArray('unclear hook calls', $bad );
  
 if ( count( $todo ) == 0 && count( $deprecated ) == 0 && count( $bad ) == 0 ) 
-       echo "Looks good!\n";
\ No newline at end of file
+       echo "Looks good!\n";
index f401215..1248570 100644 (file)
@@ -169,7 +169,7 @@ TODO:
 /////////////////////////// COMMAND LINE HELP ////////////////////////////////////
 
 // This is a command line script, load MediaWiki env (gives command line options);
-include('commandLine.inc');
+require('commandLine.inc');
 
 // if the user asked for an explanation of command line options.
 if ( isset( $options["help"] ) ) {
index 9a3cfd9..8a25ce3 100644 (file)
@@ -12,8 +12,8 @@
 $oldCwd = getcwd();
 
 $optionsWithArgs = array( "d" );
-include_once( "commandLine.inc" );
-include_once( "rebuildInterwiki.inc" );
+require( "commandLine.inc" );
+require( "rebuildInterwiki.inc" );
 chdir( $oldCwd );
 
 # Output