Script loader: Chunk the script names as passed to load-scripts.php into 128-character pieces. Avoids hitting a limit for the length of a single variable, such as suhosin.get.max_value_length which defaults to 512. fixes #22757.

git-svn-id: https://develop.svn.wordpress.org/trunk@23074 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2012-12-05 18:57:56 +00:00
parent c3b88709fd
commit b2bafcca6a
2 changed files with 10 additions and 3 deletions

View File

@@ -114,7 +114,11 @@ function get_file($path) {
return @file_get_contents($path);
}
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] );
$load = $_GET['load'];
if ( is_array( $load ) )
$load = implode( '', $load );
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
$load = explode(',', $load);
if ( empty($load) )