linode-cli icon indicating copy to clipboard operation
linode-cli copied to clipboard

bug: Fix SignatureDoesNotMatch when putting files with special characters

Open Dorthu opened this issue 4 years ago • 2 comments

Related to #277

@mechpaul discovered that putting filenames with some special characters, such as \ and $ using the obj plugin returns a SignatureDoesNotMatch error.

To reproduce:

$ echo "test" > 'test$file\name'
$ python3 -m linodecli obj put 'test$file\name' some-bucket

This change properly quotes the URLs such that these characters are accepted in keys.

Dorthu avatar Dec 14 '21 20:12 Dorthu

This fix works for uploading, but it causes problems in the web GUI.

image

I was not able to test how it worked for public read. Setting the ACL to Public Read threw another exception: Unable to set object's ACL: SignatureDoesNotMatch.

Should keys in the object bucket be unescaped?

mechpaul avatar Dec 14 '21 21:12 mechpaul

Hmm.. it does appear that the key is being stored escaped. That's not what I intended - I'll revisit it.

Dorthu avatar Dec 19 '21 23:12 Dorthu