Skip to content

fix(storage): serialize v4 post policy with JsonTrait::jsonEncode - #9871

Open
nidhiii-27 wants to merge 2 commits into
mainfrom
fix/storage-v4-post-policy-json-encoding
Open

nidhiii-27 wants to merge 2 commits into
mainfrom
fix/storage-v4-post-policy-json-encoding

Conversation

@nidhiii-27

Copy link
Copy Markdown
Contributor

SigningHelper::v4PostPolicy serializes the policy payload with JsonTrait::jsonEncode using JSON_UNESCAPED_SLASHES. Unescaped slashes, standard \uXXXX escaping of non-ASCII characters, and the POST policy conformance output remain unchanged. Added unit test coverage for v4PostPolicy JSON encoding in Storage/tests/Unit/SigningHelperTest.php.

SigningHelper::v4PostPolicy serializes the policy payload with JsonTrait::jsonEncode using JSON_UNESCAPED_SLASHES. Unescaped slashes, standard \uXXXX escaping of non-ASCII characters, and the POST policy conformance output remain unchanged. Added unit test coverage for v4PostPolicy JSON encoding in Storage/tests/Unit/SigningHelperTest.php.

[Generated-by: AI]
@nidhiii-27 nidhiii-27 added api: storage Issues related to the Cloud Storage API. generated: genai Contains Generative AI based code, requesting an additional reviewer. labels Nov 27, 2026
@nidhiii-27
nidhiii-27 marked this pull request as ready for review November 27, 2026 12:06
@nidhiii-27
nidhiii-27 requested review from a team as code owners November 27, 2026 12:06
@nidhiii-27 nidhiii-27 self-assigned this Nov 27, 2026
@nidhiii-27 nidhiii-27 added storage-bug-immunity Generated by storage-bug-immunity skill ai-generated Pull Request generated by AI labels Nov 29, 2026
Comment thread Storage/src/SigningHelper.php Resolved
SigningHelperTest now verifies that SigningHelper::v4PostPolicy throws \InvalidArgumentException when policy JSON encoding fails. Existing v4PostPolicy signing and policy serialization behavior for valid inputs remains unchanged. Updated Storage/tests/Unit/SigningHelperTest.php with the new unit test.

[Generated-by: AI]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull Request generated by AI api: storage Issues related to the Cloud Storage API. generated: genai Contains Generative AI based code, requesting an additional reviewer. storage-bug-immunity Generated by storage-bug-immunity skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants