composer-update-patch
This commit is contained in:
4
vendor/league/flysystem/src/Util.php
vendored
4
vendor/league/flysystem/src/Util.php
vendored
@@ -85,7 +85,7 @@ class Util
|
||||
$normalized = preg_replace('#\p{C}+|^\./#u', '', $path);
|
||||
$normalized = static::normalizeRelativePath($normalized);
|
||||
|
||||
if (preg_match('#/\.{2}|^\.{2}/|^\.{2}$#', $normalized)) {
|
||||
if (preg_match('#(^|/)\.{2}(/|$)#', $normalized)) {
|
||||
throw new LogicException(
|
||||
'Path is outside of the defined root, path: [' . $path . '], resolved: [' . $normalized . ']'
|
||||
);
|
||||
@@ -110,7 +110,7 @@ class Util
|
||||
$path = preg_replace('#/\.(?=/)|^\./|(/|^)\./?$#', '', $path);
|
||||
|
||||
// Regex for resolving relative paths
|
||||
$regex = '#/*[^/\.]+/\.\.#Uu';
|
||||
$regex = '#/*[^/\.]+/\.\.(?=/|$)#Uu';
|
||||
|
||||
while (preg_match($regex, $path)) {
|
||||
$path = preg_replace($regex, '', $path);
|
||||
|
||||
Reference in New Issue
Block a user