You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
URI scheme (protocol) validation rules are now specified through the Options class. By default file and http(s) URIs are allowed and validation rules defined. Validation rules for PHAR URIs are defined but the scheme is not enabled by default.
Resource retrieval has been updated to use file_get_contents for schemes other than http(s).
fixes#621fixes#2826
in lieu of #1903
Helpers::record_warnings(E_USER_WARNING, "Remote CSS resource '$file' referenced, but remote file download is disabled.", __FILE__, __LINE__);
338
-
return;
339
-
}
340
-
if ($this->_protocol === "" || $this->_protocol === "file://") {
341
-
$realfile = realpath($file);
342
-
343
-
$rootDir = realpath($options->getRootDir());
344
-
if (strpos($realfile, $rootDir) !== 0) {
345
-
$chroot = $options->getChroot();
346
-
$chrootValid = false;
347
-
foreach ($chrootas$chrootPath) {
348
-
$chrootPath = realpath($chrootPath);
349
-
if ($chrootPath !== false && strpos($realfile, $chrootPath) === 0) {
350
-
$chrootValid = true;
351
-
break;
352
-
}
353
-
}
354
-
if ($chrootValid !== true) {
355
-
Helpers::record_warnings(E_USER_WARNING, "Permission denied on $file. The file could not be found under the paths specified by Options::chroot.", __FILE__, __LINE__);
if ($chrootPath !== false && strpos($realfile, $chrootPath) === 0) {
231
-
$chrootValid = true;
232
-
break;
233
-
}
234
-
}
235
-
if ($chrootValid !== true) {
236
-
Helpers::record_warnings(E_USER_WARNING, "Permission denied on $remoteFile. The file could not be found under the paths specified by Options::chroot.", __FILE__, __LINE__);
237
-
returnfalse;
238
-
}
239
-
}
240
221
241
-
if (!$realfile) {
242
-
Helpers::record_warnings(E_USER_WARNING, "File '$realfile' not found.", __FILE__, __LINE__);
0 commit comments