~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/minify/lib/Minify/Controller/Version1.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * @package Minify
5
5
 */
6
6
 
7
 
require_once 'Minify/Controller/Base.php';
8
 
 
9
7
/**
10
8
 * Controller class for emulating version 1 of minify.php (mostly a proof-of-concept)
11
9
 * 
26
24
     * 
27
25
     */
28
26
    public function setupSources($options) {
 
27
        // PHP insecure by default: realpath() and other FS functions can't handle null bytes.
 
28
        if (isset($_GET['files'])) {
 
29
            $_GET['files'] = str_replace("\x00", '', (string)$_GET['files']);
 
30
        }
 
31
 
29
32
        self::_setupDefines();
30
33
        if (MINIFY_USE_CACHE) {
31
34
            $cacheDir = defined('MINIFY_CACHE_DIR')
51
54
        ) {
52
55
            return $options;
53
56
        }
54
 
        $extension = $m[1];
55
 
        
 
57
 
56
58
        $files = explode(',', $_GET['files']);
57
59
        if (count($files) > MINIFY_MAX_FILES) {
58
60
            return $options;
63
65
            . DIRECTORY_SEPARATOR;
64
66
        $prependAbsPaths = $_SERVER['DOCUMENT_ROOT'];
65
67
        
66
 
        $sources = array();
67
68
        $goodFiles = array();
68
69
        $hasBadSource = false;
69
70