-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix S3 handling #13829
Fix S3 handling #13829
Conversation
Fixes #13062 S3 requires seekable streams to calculate the SHA256 checksum. Since the assembly stream (from the chunking) isn't seekable we have to find a way around this. For now this just disables the use of writing a stream directly until we have a better fix. Signed-off-by: Roeland Jago Douma <[email protected]>
We could look into https://github.com/aws/aws-sdk-php/blob/8fa68de81738f851e0aa62fbc0a657f2905aa860/docs/faq.rst#how-do-i-disable-body-signing-in-s3 But for now I'd like to get this in and backported first. |
/backport to stable15 |
@@ -165,7 +165,7 @@ public function put($data) { | |||
$this->changeLock(ILockingProvider::LOCK_EXCLUSIVE); | |||
} | |||
|
|||
if ($partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) { | |||
if (false && $partStorage->instanceOfStorage(Storage\IWriteStreamStorage::class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't instead S3 not implement IWriteStreamStorage anymore?
Other storages might support it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also possible yes. I just did the quick fix that made sure that other backends with possible bugs also are not affected. But yes maybe that is cleaner.
Let me fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah not so easy. As the S3 implementation extends Common. So I propose just to get this in and do more extensive fixes later.
From looking trough it's code, I think that the Additionally we can make the assembly stream seekable |
@icewind1991 So your implementation in #13866 is superseding this one here? |
yes |
sorry asking this: is it operationally safe now? |
Fixes #13062
S3 requires seekable streams to calculate the SHA256 checksum. Since the
assembly stream (from the chunking) isn't seekable we have to find a way
around this.
For now this just disables the use of writing a stream directly until we
have a better fix.
Signed-off-by: Roeland Jago Douma [email protected]