r111705 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111704‎ | r111705 | r111706 >
Date:00:19, 17 February 2012
Author:wikinaut
Status:deferred (Comments)
Tags:
Comment:
correction: suhosin.get.max_value_length ; correction of algorithm
Modified paths:
  • /trunk/extensions/Suhosin/Suhosin.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Suhosin/Suhosin.php
@@ -53,10 +53,13 @@
5454 # $wgResourceLoaderMaxQueryLength = -1;
5555
5656 if ( extension_loaded( "suhosin" )
57 - && ini_get( "suhosin.get.max_name_length" )
58 - && isset( $wgResourceLoaderMaxQueryLength )
59 - && ( $wgResourceLoaderMaxQueryLength > 0 ) ) {
 57+ && ini_get( "suhosin.get.max_value_length" )
 58+ && isset( $wgResourceLoaderMaxQueryLength ) ) {
6059
61 - // suhosin is active, thus do something meaningful with ini_get( "suhosin.get.max_name_length" )
62 - $wgResourceLoaderMaxQueryLength = min( $wgResourceLoaderMaxQueryLength, ini_get( "suhosin.get.max_name_length" ) );
 60+ if ( $wgResourceLoaderMaxQueryLength > 0 ) {
 61+ // suhosin is active, thus do something meaningful with ini_get( "suhosin.get.max_value_length" )
 62+ $wgResourceLoaderMaxQueryLength = min( $wgResourceLoaderMaxQueryLength, ini_get( "suhosin.get.max_value_length" ) );
 63+ } else {
 64+ $wgResourceLoaderMaxQueryLength = ini_get( "suhosin.get.max_value_length" );
 65+ }
6366 }

Comments

#Comment by Wikinaut (talk | contribs)   01:13, 17 February 2012

Perhaps both the i) suhosin.get.max_name_length and ii) suhosin.get.max_value_length and iii) number of key/value pairs &= characters (&key=value) must be taken into account when calculating the $wgResourceLoaderMaxQueryLength value.

Status & tagging log