Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revalidate does not fix up incorrect SHA512 metadata on blob #7718

Open
joelverhagen opened this issue Dec 2, 2019 · 0 comments
Open

Revalidate does not fix up incorrect SHA512 metadata on blob #7718

joelverhagen opened this issue Dec 2, 2019 · 0 comments

Comments

@joelverhagen
Copy link
Member

In DEV environment, the following package has the wrong metadata header.

(Invoke-WebRequest -Method HEAD https://nugetdevlegacy.blob.core.windows.net/packages/dotnetzip.1.9.3.nupkg).Headers
Key               Value
---               -----
x-ms-meta-SHA512  E590Yhwxx1ShCON7b+zUPjt3ACR997nj850yPkbFnq3JzmhW1EsrQ8eWgaYzpzUjbOFM2eYKjKTk0AvyoS2+rw==

The real hash of the content is:

DITHu9BEaavfaG3NSUeCd6jXXJvxh8UZl3xz41RgxtGpEEM627GTzQ55Hjn+/COVPI+A8HdkOx0q9bSsNHXE3Q==

The root cause is that the Azure Storage SDK takes the metadata from the destination blob as includes it in the copy request:

PUT https://nugetdevlegacy.blob.core.windows.net/packages/dotnetzip.1.9.3.nupkg HTTP/1.1
User-Agent: Azure-Storage/9.3.2 (.NET CLR 4.0.30319.42000; Win32NT 6.2.9200.0)
x-ms-copy-source: https://nugetdevlegacy.blob.core.windows.net/validation/validation-sets/e21a061d-652a-421a-9f4d-f9b9ce3de8f0/dotnetzip.1.9.3.nupkg
If-Match: "0x8D777789423140F"
x-ms-source-if-match: "0x8D7777973E60BAD"
x-ms-meta-SHA512: E590Yhwxx1ShCON7b+zUPjt3ACR997nj850yPkbFnq3JzmhW1EsrQ8eWgaYzpzUjbOFM2eYKjKTk0AvyoS2+rw==

As documented, this causes Azure Blob Storage to not use the source metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants