Merge branch 'MDL-63655' of git://github.com/stronk7/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 25 Oct 2018 06:53:18 +0000 (14:53 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Thu, 25 Oct 2018 06:53:18 +0000 (14:53 +0800)
lib/classes/update/code_manager.php

index 9eac43b..3493ad4 100644 (file)
@@ -328,7 +328,7 @@ class code_manager {
             if ($fileinfo->getFilename() === '..') {
                 continue;
             }
-            if (strpos($fileinfo->getRealPath(), $folderpathinfo->getRealPath() !== 0)) {
+            if (strpos($fileinfo->getRealPath(), $folderpathinfo->getRealPath()) !== 0) {
                 throw new moodle_exception('unexpected_filepath_mismatch', 'core_plugin');
             }
             $key = substr($fileinfo->getRealPath(), $strip);