Azure / Azure/Azurite

StageBlock/UploadPages: not check the content aligned with "Content-MD5" header

Open
#303 5 comments 0 reactions 1 assignee Claimed by @blueww View on GitHub
blob-storage featureparity NewArch
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?
blob
### Which version of the Azurite was used?
3.3.0-preview
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
VS code
### What's the Node.js version?
v10.15.3
### What problem was encountered?
StageBlock/UploadPages: not check the content aligned with "Content-MD5" header
So the request will success, even input a wrong "Content-MD5" header
### Steps to reproduce the issue?
StageBlock/UploadPages with a wrong a wrong "Content-MD5" header
### Have you found a mitigation/solution?
No

Rest doc:

> Content-MD5 | Optional. An MD5 hash of the page content. This hash is used to verify the integrity of the page during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value.

Test case info:

> Test Name: ExtendedErrorInfoVerifyXmlWithAdditionalDetails
> Test FullName: Microsoft.Azure.Storage.StorageExceptionTests.ExtendedErrorInfoVerifyXmlWithAdditionalDetails
> Test Source: C:\code\azure-storage-net\Test\ClassLibraryCommon\StorageExceptionTests.cs : line 137
> Test Outcome: Failed
> Test Duration: 0:00:01.6398374
>
> Result StackTrace:
> at Microsoft.Azure.Storage.TestHelper.ExpectedException[T](Action operation, String operationDescription, String expectedMessage) in C:\code\azure-storage-net\Test\Common\TestHelper.Common.cs:line 85
> at Microsoft.Azure.Storage.StorageExceptionTests.ExtendedErrorInfoVerifyXmlWithAdditionalDetails() in C:\code\azure-storage-net\Test\ClassLibraryCommon\StorageExceptionTests.cs:line 164
> Result Message: Assert.Fail failed. No exception received while expecting Microsoft.Azure.Storage.StorageException: Invalid MD5 should fail with mismatch

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.