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

Blob service error response should have proper escaping for reserved format characters #48

Closed
alukyan opened this issue May 31, 2018 · 1 comment

Comments

@alukyan
Copy link

alukyan commented May 31, 2018

Minor issue.
It looks like error response formatting does not properly escape reserved format characters.

Below is error generated by attempt to append a block to deleted append blob via SAS URL.
Notice how URL included into error message has (MISSING) substrings, which are not part of URL.

This is how Golang fmt package handles unescaped reserved format characters included into format variable in calls like fmt.Sprintf(format, ...)

Strings containing reserved format characters need to be moved out of format strings or properly escaped.

-> (redacted...)/vendor/github.com/Azure/azure-storage-blob-go/2017-07-29/azblob.NewResponseError, (redacted...)/github.com/Azure/azure-storage-blob-go/2017-07-29/azblob/zz_generated_response_error.go:29
	            	===== RESPONSE ERROR (ServiceCode=BlobNotFound) =====
	            	Description=The specified blob does not exist.
	            	RequestId:09c9f9f6-b01e-00bd-767c-f80688000000
	            	Time:2018-05-31T01:11:00.8695383Z, Details: (none)
	            	   PUT https://(redacted).blob.core.windows.net/deployment/TestBlobStarter.txt?comp=appendblock&se=2018-05-31t16%!A(MISSING)50%!A(MISSING)00z&sig=REDACTED&sp=wl&sr=b&st=2018-05-30t16%!A(MISSING)50%!A(MISSING)00z&sv=2017-04-17&timeout=61
	            	   Content-Length: [272]
	            	   User-Agent: [Azure-Storage/0.1 (go1.9.4; linux)]
	            	   X-Ms-Client-Request-Id: [40ff2160-493a-4aec-697f-828b2c2ede16]
	            	   X-Ms-Version: [2017-07-29]
	            	   --------------------------------------------------------------------------------
	            	   RESPONSE Status: 404 The specified blob does not exist.
	            	   Content-Length: [215]
	            	   Content-Type: [application/xml]
	            	   Date: [Thu, 31 May 2018 01:11:00 GMT]
	            	   Server: [Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0]
	            	   X-Ms-Error-Code: [BlobNotFound]
	            	   X-Ms-Request-Id: [09c9f9f6-b01e-00bd-767c-f80688000000]
	            	   X-Ms-Version: [2017-07-29]```
@JeffreyRichter
Copy link
Member

This bug was fixed in pipeline package version 1.7.0

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

No branches or pull requests

2 participants