Skip to content

Conversation

qwwqe
Copy link
Contributor

@qwwqe qwwqe commented Jul 15, 2025

This resolves issue #2134, namely that non-UTC values of PostPolicy.expiration were being formatted into incorrect timestamps when marshaling to JSON.

No test cases were added for this change as no tests currently exist at all for PostPolicy.String() or PostPolicy.marshalJSON(). I think if test cases were to be added, however, it might be appropriate to turn the constant expirationDateFormat into a function or receiver such as func formatExpirationDate(time.Time) string and directly test the result of that, rather than testing marshalJSON() as a whole. Let me know if that'd be appreciated.

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

LGTM

@harshavardhana harshavardhana merged commit 456f9b2 into minio:master Jul 15, 2025
5 checks passed
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.

3 participants