versity / versitygw

versity s3 gateway
https://www.versity.com/products/versitygw/
Apache License 2.0
169 stars 21 forks source link

[Feature] - validate compatible azure blob names #845

Open benmcclelland opened 3 days ago

benmcclelland commented 3 days ago

Describe the solution you'd like Azure blob names have some slightly different rules than AWS S3 object names. Add validation for unsupported characters in Azure names.

Additional context https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata

We are seeing that Azure will silently replace \ char with / char when uploading objects with \ in the name. See below rule which wsasn't exactly clear that the replacement behavior is expected:

Avoid blob names that end with a dot (.), a forward slash (/), a backslash (), or a sequence or combination of the two. No path segments should end with a dot (.).