Skip to content

Commit dc3f8e2

Browse files
tasherif-msftchlowell
authored andcommitted
[Storage] Lower Case Query Param Keys in String to Sign (Azure#21262)
* fixed string to sign issue * fixed test and added changelog
1 parent 7b714df commit dc3f8e2

File tree

7 files changed

+7
-5
lines changed

7 files changed

+7
-5
lines changed

sdk/storage/azblob/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Breaking Changes
88

99
### Bugs Fixed
10+
* Fixed issue where some requests fail with mismatch in string to sign.
1011

1112
* Fixed service SAS creation where expiry time or permissions can be omitted when stored access policy is used. Fixes [#21229](https://github.com/Azure/azure-sdk-for-go/issues/21229).
1213

sdk/storage/azblob/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "go",
44
"TagPrefix": "go/storage/azblob",
5-
"Tag": "go/storage/azblob_a772b9c866"
5+
"Tag": "go/storage/azblob_0776f1b95b"
66
}

sdk/storage/azblob/internal/exported/shared_key_credential.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, er
172172

173173
// Join the sorted key values separated by ','
174174
// Then prepend "keyName:"; then add this string to the buffer
175-
cr.WriteString("\n" + paramName + ":" + strings.Join(paramValues, ","))
175+
cr.WriteString("\n" + strings.ToLower(paramName) + ":" + strings.Join(paramValues, ","))
176176
}
177177
}
178178
return cr.String(), nil

sdk/storage/azfile/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
### Breaking Changes
88

99
### Bugs Fixed
10+
* Fixed issue where some requests fail with mismatch in string to sign.
1011

1112
### Other Changes
1213

sdk/storage/azfile/internal/exported/shared_key_credential.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, er
172172

173173
// Join the sorted key values separated by ','
174174
// Then prepend "keyName:"; then add this string to the buffer
175-
cr.WriteString("\n" + paramName + ":" + strings.Join(paramValues, ","))
175+
cr.WriteString("\n" + strings.ToLower(paramName) + ":" + strings.Join(paramValues, ","))
176176
}
177177
}
178178
return cr.String(), nil

sdk/storage/azqueue/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#### Breaking Changes
88

99
#### Bugs Fixed
10-
10+
* Fixed issue where some requests fail with mismatch in string to sign.
1111
* Fixed service SAS creation where expiry time or permissions can be omitted when stored access policy is used.
1212

1313
#### Other Changes

sdk/storage/azqueue/internal/exported/shared_key_credential.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func (c *SharedKeyCredential) buildCanonicalizedResource(u *url.URL) (string, er
172172

173173
// Join the sorted key values separated by ','
174174
// Then prepend "keyName:"; then add this string to the buffer
175-
cr.WriteString("\n" + paramName + ":" + strings.Join(paramValues, ","))
175+
cr.WriteString("\n" + strings.ToLower(paramName) + ":" + strings.Join(paramValues, ","))
176176
}
177177
}
178178
return cr.String(), nil

0 commit comments

Comments
 (0)