Skip to content

Commit

Permalink
Make canonicalizedResource lower-case (Azure#26802)
Browse files Browse the repository at this point in the history
* Make canonicalizedResource lower-case
  • Loading branch information
christothes authored Feb 4, 2022
1 parent c2e25ba commit 68da1ac
Show file tree
Hide file tree
Showing 10 changed files with 754 additions and 5 deletions.
1 change: 1 addition & 0 deletions sdk/tables/Azure.Data.Tables/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Breaking Changes

### Bugs Fixed
- Fixed an issue that caused authenticate failures when using a SAS token with a table name that contains upper-case characters. ([#26791](https://github.com/Azure/azure-sdk-for-net/issues/26791))

### Other Changes

Expand Down
4 changes: 2 additions & 2 deletions sdk/tables/Azure.Data.Tables/src/Sas/TableSasBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public TableSasBuilder(string tableName, string rawPermissions, DateTimeOffset e
Argument.AssertNotNullOrEmpty(tableName, nameof(tableName));
Argument.AssertNotNullOrEmpty(rawPermissions, nameof(tableName));

TableName = tableName.ToLowerInvariant();
TableName = tableName;
ExpiresOn = expiresOn;
Permissions = rawPermissions.ToLowerInvariant();
}
Expand Down Expand Up @@ -256,7 +256,7 @@ public string Sign(TableSharedKeyCredential sharedKeyCredential) =>
/// </returns>
private static string GetCanonicalName(string account, string tableName) =>
// Table: "/table/account/tablename"
string.Join("", new[] { "/table/", account, "/", tableName });
string.Join("", new[] { "/table/", account, "/", tableName.ToLowerInvariant() });

/// <summary>
/// Returns a string that represents the current object.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 68da1ac

Please sign in to comment.