mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
fix(s3): decode unsigned streaming checksum payloads (#3476)
This commit is contained in:
1 parent
daff15da9f
commit
d11fff3d6d
2 files changed
+76
-2
No files matched your search
@@ -1940,9 +1940,11 @@ public class S3Controller {
|
||||
* Format: hex-size;chunk-signature=sig\r\n data \r\n ... 0;chunk-signature=sig\r\n
|
||||
*/
|
||||
private byte[] decodeAwsChunked(byte[] body, String contentEncoding, String contentSha256) {
|
||||
boolean isAwsChunked = (contentEncoding != null && contentEncoding.contains("aws-chunked"))
|
||||
boolean isAwsChunked = (contentEncoding != null
|
||||
&& contentEncoding.toLowerCase(Locale.ROOT).contains("aws-chunked"))
|
||||
|| "STREAMING-AWS4-HMAC-SHA256-PAYLOAD".equals(contentSha256)
|
||||
|| "STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER".equals(contentSha256);
|
||||
|| "STREAMING-AWS4-HMAC-SHA256-PAYLOAD-TRAILER".equals(contentSha256)
|
||||
|| "STREAMING-UNSIGNED-PAYLOAD-TRAILER".equals(contentSha256);
|
||||
if (!isAwsChunked) {
|
||||
return body;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user