Skip to content

fix: incorrect set x-amz-date for signV4#2096

Merged
harshavardhana merged 1 commit intominio:masterfrom
jiuker:fix-incorrect-set-date
Apr 18, 2025
Merged

fix: incorrect set x-amz-date for signV4#2096
harshavardhana merged 1 commit intominio:masterfrom
jiuker:fix-incorrect-set-date

Conversation

@jiuker
Copy link
Copy Markdown
Contributor

@jiuker jiuker commented Apr 18, 2025

fix: incorrect set x-amz-date for signV4
if not,minio will check signature with incorrect time

fix: incorrect set x-amz-date for signV4
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue with the x-amz-date header used during signature calculation in the StreamingUnsignedV4 flow.

  • Changed the timestamp from time.Now().UTC() to a previously defined variable t for consistency in the signature calculation.
Comments suppressed due to low confidence (1)

pkg/signer/request-signature-v4.go:336

  • Ensure that the variable t is properly initialized with the correct timestamp before this call to prevent signature mismatches.
return StreamingUnsignedV4(&req, sessionToken, req.ContentLength, t)

@jiuker jiuker requested a review from krisis April 18, 2025 09:07
@harshavardhana harshavardhana merged commit e8e8aca into minio:master Apr 18, 2025
5 checks passed
aminueza added a commit to aminueza/terraform-provider-minio that referenced this pull request Mar 10, 2026
- Extract -1 magic number into emptyFilterSentinel constant with doc
  comment explaining the workaround and linking upstream issue
- Add TODO to remove once minio/minio-go#2096 is fixed
- Tighten tag test assertion to verify full <Filter><And>...</And></Filter>
  structure instead of just "<And>" substring
- Add sentinel leak guard: every test case now asserts
  ObjectSizeGreaterThan never appears in the XML output
- Add TestEmptyFilterSentinelNotAppliedToNonEmptyFilter to verify
  the sentinel is only injected for genuinely empty filters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants