Repository navigation
Flysystem V2/V3: Security fixes v2.6.0
Security
- The minimum versions of the dependencies now exclude all releases with a known security advisory (14 Dependabot alerts):
guzzlehttp/guzzle^7.15.2or^8.0.1guzzlehttp/psr7^2.12.3or^3.0league/flysystem^3.35.3google/apiclient^2.19
readStream()sends the access token and the cookies only to Google hosts. Before, each redirect host received the token.- File names in Google Drive queries are escaped (option
useSinglePathTransaction).
Requirements
- PHP 8.1 or later. The source already needed PHP 8.0.
- Guzzle 6, PSR-7 1.x and Flysystem 2 are not supported anymore, because these lines have no patched release. For Flysystem 2, stay on v2.5.0.
- Guzzle 8 and PSR-7 3 are supported.
Fixes
- Metadata of a shortcut caused a fatal error.
copy()andmove()failed when the object cache did not contain the source file.hasDir()failed for a path that does not exist.UnableToWriteFilenow has the original error as its cause.- Resumable uploads send
content-lengthonly when the size of the body is known.
Changes
- The adapter sets 3 retries on the Google client for temporary errors (HTTP 500, HTTP 503, rate limit, connection failure). An application that sets the
retryconfiguration of the client keeps its own value. To have no retries, call$client->setConfig('retry', ['retries' => 0])before you create the adapter. - The integration tests read
google-drive-service-account.jsonfrom the directory that contains the project directory, or from the path in the environment variableGOOGLE_DRIVE_SERVICE_ACCOUNT_FILE.
Pull requests
Parts of the security fixes and the other fixes are based on #142 by tarikmanoar.
Full Changelog: v2.5.0...v2.6.0