r75424 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75423‎ | r75424 | r75425 >
Date:14:31, 26 October 2010
Author:platonides
Status:ok
Tags:
Comment:
Place into an else branch in the odd case where we are in safe_mode and passthru is additionally blocked.
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2468,14 +2468,15 @@
24692469 if( wfIniGetBool( 'safe_mode' ) ) {
24702470 wfDebug( "wfShellExec can't run in safe_mode, PHP's exec functions are too broken.\n" );
24712471 $disabled = 'safemode';
 2472+ } else {
 2473+ $functions = explode( ',', ini_get( 'disable_functions' ) );
 2474+ $functions = array_map( 'trim', $functions );
 2475+ $functions = array_map( 'strtolower', $functions );
 2476+ if ( in_array( 'passthru', $functions ) ) {
 2477+ wfDebug( "passthru is in disabled_functions\n" );
 2478+ $disabled = 'passthru';
 2479+ }
24722480 }
2473 - $functions = explode( ',', ini_get( 'disable_functions' ) );
2474 - $functions = array_map( 'trim', $functions );
2475 - $functions = array_map( 'strtolower', $functions );
2476 - if ( in_array( 'passthru', $functions ) ) {
2477 - wfDebug( "passthru is in disabled_functions\n" );
2478 - $disabled = 'passthru';
2479 - }
24802481 }
24812482 if ( $disabled ) {
24822483 $retval = 1;

Status & tagging log