r87479 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87478‎ | r87479 | r87480 >
Date:03:15, 5 May 2011
Author:tstarling
Status:ok
Tags:
Comment:
Fixed some register_globals vulnerabilities.
Modified paths:
  • /branches/REL1_17/extensions/Cassandra/Cassandra_body.php (modified) (history)
  • /branches/REL1_17/extensions/Cassandra/lib/Cassandra.php (modified) (history)
  • /branches/REL1_17/extensions/Cassandra/lib/cassandra_constants.php (modified) (history)
  • /branches/REL1_17/extensions/Cassandra/lib/cassandra_types.php (modified) (history)
  • /branches/REL1_17/extensions/CreateRedirect/CreateRedirect.body.php (modified) (history)
  • /branches/REL1_17/extensions/FirefoggChunkedUpload/tests/UploadFromChunksTest.php (modified) (history)
  • /branches/REL1_17/extensions/HtmlUi/templates/HtmlUiFieldset.php (modified) (history)
  • /branches/REL1_17/extensions/RDFIO/stores/SMW_ARC2Store.php (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/Cassandra/Cassandra_body.php
@@ -1,4 +1,7 @@
22 <?php
 3+if ( !defined( 'MEDIAWIKI' ) ) {
 4+ exit;
 5+}
36
47 global $wgThriftRoot, $wgAutoloadClasses;
58 $GLOBALS['THRIFT_ROOT'] = $wgThriftRoot;
@@ -115,4 +118,4 @@
116119 . "\n\nStack trace: " . $e->getTraceAsString()
117120 );
118121 }
119 -}
\ No newline at end of file
 122+}
Index: branches/REL1_17/extensions/Cassandra/lib/cassandra_constants.php
@@ -1,4 +1,7 @@
22 <?php
 3+if ( !defined( 'MEDIAWIKI' ) ) {
 4+ exit;
 5+}
36 /**
47 * Autogenerated by Thrift
58 *
@@ -10,4 +13,4 @@
1114
1215 $GLOBALS['cassandra_CONSTANTS']['VERSION'] = "0.5.1";
1316
14 -?>
\ No newline at end of file
 17+?>
Index: branches/REL1_17/extensions/Cassandra/lib/Cassandra.php
@@ -1,4 +1,7 @@
22 <?php
 3+if ( !defined( 'MEDIAWIKI' ) ) {
 4+ exit;
 5+}
36 /**
47 * Autogenerated by Thrift
58 *
@@ -4584,4 +4587,4 @@
45854588
45864589 }
45874590
4588 -?>
\ No newline at end of file
 4591+?>
Index: branches/REL1_17/extensions/Cassandra/lib/cassandra_types.php
@@ -1,4 +1,7 @@
22 <?php
 3+if ( !defined( 'MEDIAWIKI' ) ) {
 4+ exit;
 5+}
36 /**
47 * Autogenerated by Thrift
58 *
@@ -1168,4 +1171,4 @@
11691172
11701173 }
11711174
1172 -?>
\ No newline at end of file
 1175+?>
Index: branches/REL1_17/extensions/RDFIO/stores/SMW_ARC2Store.php
@@ -1,13 +1,13 @@
22 <?php
33
 4+if ( !defined( 'MEDIAWIKI' ) ) {
 5+ die( 'Not a valid entry point.' );
 6+}
 7+
48 global $IP;
59
610 require_once( "$IP/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php" );
711
8 -if ( !defined( 'MEDIAWIKI' ) ) {
9 - die( 'Not a valid entry point.' );
10 -}
11 -
1212 /**
1313 * SMWARC2Store extends SMWSQLStore2 and forwards all update/delete to ARC2 via SPARQL+
1414 * queries. The class was based on JosekiStore in the SparqlExtension, which in turn is
Index: branches/REL1_17/extensions/FirefoggChunkedUpload/tests/UploadFromChunksTest.php
@@ -1,4 +1,7 @@
22 <?php
 3+if ( !defined( 'MEDIAWIKI' ) ) {
 4+ exit;
 5+}
36
47 global $IP;
58 require_once( "$IP/maintenance/tests/ApiSetup.php" );
Index: branches/REL1_17/extensions/HtmlUi/templates/HtmlUiFieldset.php
@@ -1,3 +1,4 @@
 2+<?php if ( !defined( 'MEDIAWIKI' ) ) exit; ?>
23 <fieldset class="htmlUiFieldset" rel="<?php echo $id ?>">
34 <?php foreach( $elements as $element ): ?>
45 <?php echo $element->render(); ?>
Index: branches/REL1_17/extensions/CreateRedirect/CreateRedirect.body.php
@@ -28,7 +28,7 @@
2929 if ( !defined( 'MEDIAWIKI' ) ) {
3030 echo <<<EOT
3131 To install the CreateRedirect extension, put the following line in LocalSettings.php:
32 -require_once( "$IP/extensions/CreateRedirect/CreateRedirect.php" );
 32+require_once( "\$IP/extensions/CreateRedirect/CreateRedirect.php" );
3333 EOT;
3434 exit( 1 );
3535 }

Status & tagging log