Repository navigation
Fix container scope check for Blob Batch subrequests - #2891
Open
compiler-segfault (compiler-segfault) wants to merge 1 commit into
Open
compiler-segfault (compiler-segfault) wants to merge 1 commit into
compiler-segfault (compiler-segfault) wants to merge 1 commit into
Conversation
A container-scoped batch accepted subrequests for sibling containers whose name starts with the scope container's name, and executed them. Require the matched prefix to end at a path separator.
Author
|
@microsoft-github-policy-service agree |
Author
|
CLA is signed now ( |
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.
A container-scoped Blob Batch request accepted subrequests that target a sibling container whose name starts with the scope container's name: a batch scoped to
logsalso deleted a blob inlogs-archive. Azure Storage requires each subrequest to apply to the container in the request URI and rejects the batch otherwise.BlobBatchHandler.parseSubRequestscompares the subrequest path withstartsWith(), which matches at a character boundary rather than a path-segment boundary. The matched prefix now has to end at/; a service-level batch (empty prefix) still accepts every path.Fixes #2884.
PR Branch Destination
main.Always Add Test Cases
[x] New case in
tests/blob/apis/blobbatch.test.ts: it createscontainerX-archivenext to the batch's containercontainerX, uploads a blob there and submits a container-scoped batch delete for that blob. Before the change the subrequest ran (subResponsesSucceededCountwas 1 and the blob was gone); after it the batch reports a failed subrequest and the blob is still there. The whole file passes (17 tests), andnpm run lintis clean.Add Change Log
[x]
ChangeLog.mdhas an entry under "Upcoming Release" → Blob.