This is an automated email from the ASF dual-hosted git repository.
tustvold pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/master by this push:
new 0e9abcd69e check sign_payload instead of skip_signature before
computing checksum (#6698)
0e9abcd69e is described below
commit 0e9abcd69eedb4080f74e0631ca3cf065cf6553e
Author: Marco Herrera-Rendon <[email protected]>
AuthorDate: Fri Nov 8 15:44:51 2024 -0700
check sign_payload instead of skip_signature before computing checksum
(#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]>
---
object_store/src/aws/client.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/object_store/src/aws/client.rs b/object_store/src/aws/client.rs
index a610e63517..895308f588 100644
--- a/object_store/src/aws/client.rs
+++ b/object_store/src/aws/client.rs
@@ -372,7 +372,9 @@ impl<'a> Request<'a> {
}
pub(crate) fn with_payload(mut self, payload: PutPayload) -> Self {
- if !self.config.skip_signature || self.config.checksum.is_some() {
+ if (!self.config.skip_signature && self.config.sign_payload)
+ || self.config.checksum.is_some()
+ {
let mut sha256 = Context::new(&digest::SHA256);
payload.iter().for_each(|x| sha256.update(x));
let payload_sha256 = sha256.finish();