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

Fixed storage bug where SAS content headers were not URL-encoded #9290

Merged

Conversation

seanmcc-msft
Copy link
Member

Resolves #9265

@@ -260,27 +260,27 @@ internal static void AppendProperties(this SasQueryParameters parameters, String

if (!string.IsNullOrWhiteSpace(parameters.CacheControl))
{
stringBuilder.AppendQueryParameter(Constants.Sas.Parameters.CacheControl, parameters.CacheControl);
stringBuilder.AppendQueryParameter(Constants.Sas.Parameters.CacheControl, WebUtility.UrlEncode(parameters.CacheControl));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker but you could refactor this out into a method instead of rewriting the code a bunch of times.

Copy link
Member

@JoshLove-msft JoshLove-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - I wonder if other languages have the same issue.

@seanmcc-msft seanmcc-msft merged commit c7bf0cc into Azure:master Jan 3, 2020
@seanmcc-msft seanmcc-msft deleted the features/storage/sasUrlEncodingBug branch January 3, 2020 19:48
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

Successfully merging this pull request may close these issues.

[BUG] BlobSasBuilder.ToString() doesn't apply URL encoding to ContentDisposition value.
3 participants