Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,7 @@
'League\\Flysystem\\ConfigAwareTrait' => $vendorDir . '/league/flysystem/src/ConfigAwareTrait.php',
'League\\Flysystem\\ConnectionErrorException' => $vendorDir . '/league/flysystem/src/ConnectionErrorException.php',
'League\\Flysystem\\ConnectionRuntimeException' => $vendorDir . '/league/flysystem/src/ConnectionRuntimeException.php',
'League\\Flysystem\\CorruptedPathDetected' => $vendorDir . '/league/flysystem/src/CorruptedPathDetected.php',
'League\\Flysystem\\Directory' => $vendorDir . '/league/flysystem/src/Directory.php',
'League\\Flysystem\\Exception' => $vendorDir . '/league/flysystem/src/Exception.php',
'League\\Flysystem\\File' => $vendorDir . '/league/flysystem/src/File.php',
Expand Down
1 change: 1 addition & 0 deletions composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -2161,6 +2161,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
'League\\Flysystem\\ConfigAwareTrait' => __DIR__ . '/..' . '/league/flysystem/src/ConfigAwareTrait.php',
'League\\Flysystem\\ConnectionErrorException' => __DIR__ . '/..' . '/league/flysystem/src/ConnectionErrorException.php',
'League\\Flysystem\\ConnectionRuntimeException' => __DIR__ . '/..' . '/league/flysystem/src/ConnectionRuntimeException.php',
'League\\Flysystem\\CorruptedPathDetected' => __DIR__ . '/..' . '/league/flysystem/src/CorruptedPathDetected.php',
'League\\Flysystem\\Directory' => __DIR__ . '/..' . '/league/flysystem/src/Directory.php',
'League\\Flysystem\\Exception' => __DIR__ . '/..' . '/league/flysystem/src/Exception.php',
'League\\Flysystem\\File' => __DIR__ . '/..' . '/league/flysystem/src/File.php',
Expand Down
15 changes: 7 additions & 8 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1641,17 +1641,17 @@
},
{
"name": "league/flysystem",
"version": "1.1.3",
"version_normalized": "1.1.3.0",
"version": "1.1.4",
"version_normalized": "1.1.4.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a"
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a",
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a",
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
"shasum": ""
},
"require": {
Expand All @@ -1667,7 +1667,6 @@
"phpunit/phpunit": "^8.5.8"
},
"suggest": {
"ext-fileinfo": "Required for MimeType",
"ext-ftp": "Allows you to use FTP server storage",
"ext-openssl": "Allows you to use FTPS server storage",
"league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
Expand All @@ -1682,7 +1681,7 @@
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
},
"time": "2020-08-23T07:39:11+00:00",
"time": "2021-06-23T21:56:05+00:00",
"type": "library",
"extra": {
"branch-alias": {
Expand Down Expand Up @@ -1727,7 +1726,7 @@
],
"support": {
"issues": "https://github.com/thephpleague/flysystem/issues",
"source": "https://github.com/thephpleague/flysystem/tree/1.x"
"source": "https://github.com/thephpleague/flysystem/tree/1.1.4"
},
"funding": [
{
Expand Down
10 changes: 5 additions & 5 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
'reference' => 'e6a054be58a6c8b2fda92fbc7fbfd898f26fa0d2',
'reference' => '557bcea1bcccc0dbbb66305c98d208b1135b6096',
'name' => 'nextcloud/3rdparty',
'dev' => false,
),
Expand Down Expand Up @@ -218,12 +218,12 @@
'dev_requirement' => false,
),
'league/flysystem' => array(
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../league/flysystem',
'aliases' => array(),
'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
'reference' => 'f3ad69181b8afed2c9edf7be5a2918144ff4ea32',
'dev_requirement' => false,
),
'league/mime-type-detection' => array(
Expand Down Expand Up @@ -286,7 +286,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
'reference' => 'e6a054be58a6c8b2fda92fbc7fbfd898f26fa0d2',
'reference' => '557bcea1bcccc0dbbb66305c98d208b1135b6096',
'dev_requirement' => false,
),
'nextcloud/lognormalizer' => array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final class Versions
'icewind/searchdav' => 'v2.0.0@c69806d900c2c9a5954bfabc80178d6eb0d63df4',
'icewind/streams' => 'v0.7.5@0c6aae16ebdadb257f0bd089c1e1e4cf5e20ddc2',
'justinrainbow/json-schema' => '5.2.10@2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b',
'league/flysystem' => '1.1.3@9be3b16c877d477357c015cec057548cf9b2a14a',
'league/flysystem' => '1.1.4@f3ad69181b8afed2c9edf7be5a2918144ff4ea32',
'league/mime-type-detection' => '1.7.0@3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3',
'league/uri' => '6.4.0@09da64118eaf4c5d52f9923a1e6a5be1da52fd9a',
'league/uri-interfaces' => '2.2.0@667f150e589d65d79c89ffe662e426704f84224f',
Expand Down Expand Up @@ -120,7 +120,7 @@ final class Versions
'web-auth/cose-lib' => 'v3.3.1@eea6fae63ff5c81bf98c115b1be5f38a69682c16',
'web-auth/metadata-service' => 'v3.3.1@8488d3a832a38cc81c670fce05de1e515c6e64b1',
'web-auth/webauthn-lib' => 'v3.3.1@e411527a41c1013512fccdfce61681eb36484c77',
'nextcloud/3rdparty' => 'dev-master@e6a054be58a6c8b2fda92fbc7fbfd898f26fa0d2',
'nextcloud/3rdparty' => 'dev-master@557bcea1bcccc0dbbb66305c98d208b1135b6096',
);

private function __construct()
Expand Down
1 change: 0 additions & 1 deletion league/flysystem/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
}
},
"suggest": {
"ext-fileinfo": "Required for MimeType",
"league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
"league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
"league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
Expand Down
17 changes: 17 additions & 0 deletions league/flysystem/src/CorruptedPathDetected.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace League\Flysystem;

use LogicException;

class CorruptedPathDetected extends LogicException implements FilesystemException
{
/**
* @param string $path
* @return CorruptedPathDetected
*/
public static function forPath($path)
{
return new CorruptedPathDetected("Corrupted path detected: " . $path);
}
}
13 changes: 7 additions & 6 deletions league/flysystem/src/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
use League\Flysystem\Util\ContentListingFormatter;

/**
* @method array getWithMetadata(string $path, array $metadata)
* @method bool forceCopy(string $path, string $newpath)
* @method bool forceRename(string $path, string $newpath)
* @method array listFiles(string $path = '', boolean $recursive = false)
* @method array listPaths(string $path = '', boolean $recursive = false)
* @method array listWith(array $keys = [], $directory = '', $recursive = false)
* @method void emptyDir(string $dirname)
* @method array|false getWithMetadata(string $path, string[] $metadata)
* @method bool forceCopy(string $path, string $newpath)
* @method bool forceRename(string $path, string $newpath)
* @method array listFiles(string $path = '', boolean $recursive = false)
* @method string[] listPaths(string $path = '', boolean $recursive = false)
* @method array listWith(string[] $keys = [], $directory = '', $recursive = false)
*/
class Filesystem implements FilesystemInterface
{
Expand Down
2 changes: 0 additions & 2 deletions league/flysystem/src/MountManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
* @method void assertPresent($path)
* @method void assertAbsent($path)
* @method Filesystem addPlugin(PluginInterface $plugin)
*
* @deprecated This functionality will be removed in 2.0
*/
class MountManager implements FilesystemInterface
{
Expand Down
4 changes: 2 additions & 2 deletions league/flysystem/src/Plugin/GetWithMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public function getMethod()
/**
* Get metadata for an object with required metadata.
*
* @param string $path path to file
* @param array $metadata metadata keys
* @param string $path path to file
* @param string[] $metadata metadata keys
*
* @throws InvalidArgumentException
* @throws FileNotFoundException
Expand Down
2 changes: 1 addition & 1 deletion league/flysystem/src/Plugin/ListPaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function getMethod()
* @param string $directory
* @param bool $recursive
*
* @return array paths
* @return string[] paths
*/
public function handle($directory = '', $recursive = false)
{
Expand Down
6 changes: 3 additions & 3 deletions league/flysystem/src/Plugin/ListWith.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public function getMethod()
/**
* List contents with metadata.
*
* @param array $keys
* @param string $directory
* @param bool $recursive
* @param string[] $keys
* @param string $directory
* @param bool $recursive
*
* @return array listing with metadata
*/
Expand Down
19 changes: 10 additions & 9 deletions league/flysystem/src/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use League\Flysystem\Util\MimeType;
use LogicException;

use function strcmp;

class Util
{
/**
Expand Down Expand Up @@ -102,8 +104,7 @@ public static function normalizePath($path)
public static function normalizeRelativePath($path)
{
$path = str_replace('\\', '/', $path);
$path = static::removeFunkyWhiteSpace($path);

$path = static::removeFunkyWhiteSpace($path);
$parts = [];

foreach (explode('/', $path) as $part) {
Expand All @@ -127,22 +128,22 @@ public static function normalizeRelativePath($path)
}
}

return implode('/', $parts);
$path = implode('/', $parts);

return $path;
}

/**
* Removes unprintable characters and invalid unicode characters.
* Rejects unprintable characters and invalid unicode characters.
*
* @param string $path
*
* @return string $path
*/
protected static function removeFunkyWhiteSpace($path)
{
// We do this check in a loop, since removing invalid unicode characters
// can lead to new characters being created.
while (preg_match('#\p{C}+|^\./#u', $path)) {
$path = preg_replace('#\p{C}+|^\./#u', '', $path);
if (preg_match('#\p{C}+#u', $path)) {
throw CorruptedPathDetected::forPath($path);
}

return $path;
Expand Down Expand Up @@ -205,7 +206,7 @@ public static function emulateDirectories(array $listing)
$listedDirectories = [];

foreach ($listing as $object) {
list($directories, $listedDirectories) = static::emulateObjectDirectories($object, $directories, $listedDirectories);
[$directories, $listedDirectories] = static::emulateObjectDirectories($object, $directories, $listedDirectories);
}

$directories = array_diff(array_unique($directories), array_unique($listedDirectories));
Expand Down