Skip to content

Commit 0e9abcd

Browse files
check sign_payload instead of skip_signature before computing checksum (apache#6698)
* check sign_payload instead of skip_signature before computing checksum * Update object_store/src/aws/client.rs Co-authored-by: Raphael Taylor-Davies <[email protected]> * fix format --------- Co-authored-by: Raphael Taylor-Davies <[email protected]>
1 parent a2a80ca commit 0e9abcd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

object_store/src/aws/client.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ impl<'a> Request<'a> {
372372
}
373373

374374
pub(crate) fn with_payload(mut self, payload: PutPayload) -> Self {
375-
if !self.config.skip_signature || self.config.checksum.is_some() {
375+
if (!self.config.skip_signature && self.config.sign_payload)
376+
|| self.config.checksum.is_some()
377+
{
376378
let mut sha256 = Context::new(&digest::SHA256);
377379
payload.iter().for_each(|x| sha256.update(x));
378380
let payload_sha256 = sha256.finish();

0 commit comments

Comments
 (0)