]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/load-scripts.php
WordPress 4.1.3
[autoinstalls/wordpress.git] / wp-admin / load-scripts.php
index 8cdb9f7ee058fb9e41819d5c11dccf0e6ff6ce4e..81c4fc61629a915e3cea8bf622dd6d2c87da7778 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * Disable error reporting
  *
- * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging
+ * Set this to error_reporting( -1 ) for debugging.
  */
 error_reporting(0);
 
@@ -114,8 +114,12 @@ function get_file($path) {
        return @file_get_contents($path);
 }
 
-$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $_GET['load'] );
-$load = explode(',', $load);
+$load = $_GET['load'];
+if ( is_array( $load ) )
+       $load = implode( '', $load );
+
+$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
+$load = array_unique( explode( ',', $load ) );
 
 if ( empty($load) )
        exit;
@@ -125,7 +129,7 @@ require(ABSPATH . WPINC . '/version.php');
 
 $compress = ( isset($_GET['c']) && $_GET['c'] );
 $force_gzip = ( $compress && 'gzip' == $_GET['c'] );
-$expires_offset = 31536000;
+$expires_offset = 31536000; // 1 year
 $out = '';
 
 $wp_scripts = new WP_Scripts();