Repository navigation
Validate Blob Batch response IDs and multipart content type - #7466
Merged
JinmingHu (Jinming-Hu) merged 3 commits intoOct 16, 2026
Merged
Conversation
Reject malformed, duplicate and incomplete response mappings before dispatch. Preserve batch-level failures and add mocked submit-path regressions for service and container batches. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Report missing, truncated and mismatched Content-Type headers through StorageException while retaining HTTP batch errors and valid multipart responses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Member
Author
|
/azp run cpp - storage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new Content-Type comparison rejects valid mixed-case media types and parameter names.
1 open finding
What changed in this PR
Hardens Blob Batch response parsing to validate request-response mappings and multipart content types.
Changes:
- Rejects invalid, duplicate, out-of-range, and incomplete Content-ID mappings.
- Adds multipart validation while preserving reversed responses and batch errors.
- Registers 24 mocked service/container regression tests.
| File | Description |
|---|---|
| sdk/storage/azure-storage-blobs/test/ut/CMakeLists.txt | Registers batch response tests. |
| sdk/storage/azure-storage-blobs/test/ut/blob_batch_response_test.cpp | Tests malformed responses and valid mappings. |
| sdk/storage/azure-storage-blobs/src/blob_batch.cpp | Validates multipart responses and Content-ID mappings. |
🧠 Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run cpp - storage |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Anton Kolesnyk (antkmsft)
approved these changes
Oct 15, 2026
11 of 18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Validate Blob Batch response Content-ID values against submitted requests. Reject negative, malformed, overflowing, duplicate, out-of-range, and incomplete mappings with controlled errors, while preserving valid reversed response order and batch-level errors. Validate multipart Content-Type before parsing responses.
Add 24 mocked SubmitBatch regression tests and register them with the unit-test target.
Validation: MSVC C++14 Debug production build succeeded; all 24 batch regressions passed at
27f427f35145d69eda2132a69c999741cb64128c. Changed production lines and the new test file were validated with clang-format 20.git diff --check e0016580d2e7c30aeb1d3bc50cba7b570d72621b HEADpassed. Full unrelated SDK and live tests were not run.Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the contributing guide.