Skip to content

Commit 0f6b952

Browse files
authored
Google Storage Private Signer was encoding twice (#462)
* Fix Missing Escape '+' from Storage Urls * Fix Missing Escape '+' from Storage Urls * Rename Method * Improve comment * Missing Url Encode after Refactoring * Var name improved for readability * EncodeURL mark as obsolete * Use EscapeDataString instead of UrlEncode for encoding "path" part of the URL. * Do not Encode URLS when using Google Signer, as the Signer already Encodes the URL
1 parent eb6ddea commit 0f6b952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/dotnetframework/Providers/Storage/GXGoogleCloud/ExternalProviderGoogle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ private bool IsPrivateResource(GxFileType fileType)
282282
private string GetURL(string objectName, GxFileType fileType, int urlMinutes = 0)
283283
{
284284
if (IsPrivateResource(fileType))
285-
return Signer.Sign(Bucket, StorageUtils.EncodeUrlPath(objectName), ResolveExpiration(urlMinutes), HttpMethod.Get);
285+
return Signer.Sign(Bucket, objectName, ResolveExpiration(urlMinutes), HttpMethod.Get);
286286
else
287287
{
288288
return StorageUri + StorageUtils.EncodeUrlPath(objectName);

0 commit comments

Comments
 (0)