mirror of
https://github.com/floci-io/floci.git
synced 2026-11-29 08:31:53 -05:00
CopyObject ignored its Object Lock headers, and CreateMultipartUpload ignored those and its grant headers, so the copy or the completed upload came out without the lock or the grants the request asked for. PutObject read the lock headers without checking them: a malformed retain-until date was a 500, and a mode without a date, a date without a mode or an unknown mode was accepted. PutObject, CopyObject and CreateMultipartUpload now read the lock headers through one check that refuses them as S3 does, with InvalidArgument naming the header: a mode and a date come together, checked first, and the mode is GOVERNANCE or COMPLIANCE. A date that is not an ISO 8601 timestamp is refused the same way. CopyObject applies the settings to the copy. CreateMultipartUpload keeps them and its grants, and applies them when the upload completes. Its grants are checked when the upload is created, under the bucket-owner-enforced rule PutObject uses, so a grant S3 refuses fails the creation rather than the completion. Refs #5716