allow prefix/markers to have '/' in the beginning to throw an empty (#17373)

This commit is contained in:
Harshavardhana 2023-06-07 11:25:26 -07:00 committed by GitHub
parent eba378e4a1
commit 49ce85ee3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,8 @@ func getListObjectsV1Args(values url.Values) (prefix, marker, delimiter string,
maxkeys = maxObjectList maxkeys = maxObjectList
} }
prefix = trimLeadingSlash(values.Get("prefix")) prefix = values.Get("prefix")
marker = trimLeadingSlash(values.Get("marker")) marker = values.Get("marker")
delimiter = values.Get("delimiter") delimiter = values.Get("delimiter")
encodingType = values.Get("encoding-type") encodingType = values.Get("encoding-type")
return return
@ -57,8 +57,8 @@ func getListBucketObjectVersionsArgs(values url.Values) (prefix, marker, delimit
maxkeys = maxObjectList maxkeys = maxObjectList
} }
prefix = trimLeadingSlash(values.Get("prefix")) prefix = values.Get("prefix")
marker = trimLeadingSlash(values.Get("key-marker")) marker = values.Get("key-marker")
delimiter = values.Get("delimiter") delimiter = values.Get("delimiter")
encodingType = values.Get("encoding-type") encodingType = values.Get("encoding-type")
versionIDMarker = values.Get("version-id-marker") versionIDMarker = values.Get("version-id-marker")
@ -87,8 +87,8 @@ func getListObjectsV2Args(values url.Values) (prefix, token, startAfter, delimit
maxkeys = maxObjectList maxkeys = maxObjectList
} }
prefix = trimLeadingSlash(values.Get("prefix")) prefix = values.Get("prefix")
startAfter = trimLeadingSlash(values.Get("start-after")) startAfter = values.Get("start-after")
delimiter = values.Get("delimiter") delimiter = values.Get("delimiter")
fetchOwner = values.Get("fetch-owner") == "true" fetchOwner = values.Get("fetch-owner") == "true"
encodingType = values.Get("encoding-type") encodingType = values.Get("encoding-type")
@ -118,8 +118,8 @@ func getBucketMultipartResources(values url.Values) (prefix, keyMarker, uploadID
maxUploads = maxUploadsList maxUploads = maxUploadsList
} }
prefix = trimLeadingSlash(values.Get("prefix")) prefix = values.Get("prefix")
keyMarker = trimLeadingSlash(values.Get("key-marker")) keyMarker = values.Get("key-marker")
uploadIDMarker = values.Get("upload-id-marker") uploadIDMarker = values.Get("upload-id-marker")
delimiter = values.Get("delimiter") delimiter = values.Get("delimiter")
encodingType = values.Get("encoding-type") encodingType = values.Get("encoding-type")