You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we try to operate resources where the path contains special characters, it generates an incorrect signature.
There is a example in the /tests/behavior/read_write_test.go#L78
// creates a file with special chars should be successfunctestCreateFileWithSpecialChars(t*testing.T, op*yadal.Operator) {
path:=fmt.Sprintf("%s %s", uuid.New().String(), "!@#$%^&*()_+-=;'><,?.txt")
o:=op.Object(path)
err:=o.Create(context.TODO())
assert.Nilf(t, err, "%s", err)
meta, err:=o.Metadata(context.TODO())
assert.Nilf(t, err, "%s", err)
assert.Equal(t, interfaces.FILE, meta.Mode())
assert.Equal(t, uint64(0), *meta.ContentLength())
err=o.Delete(context.TODO())
assert.Nilf(t, err, "%s", err)
}
Then we will receive:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
<Key>d9a2080a-c33a-4c83-a42b-e0f3255979d5 !@#$%^&*()_+-=;'><,?.txt</Key>
<BucketName>test</BucketName>
<Resource>/test/d9a2080a-c33a-4c83-a42b-e0f3255979d5 !@#$%^&*()_+-=;'><,?.txt</Resource>
<Region>us-west-01</Region>
<RequestId>171E56F294000824</RequestId>
<HostId>d2593ff9-ea7b-4553-bc29-df692d774e27</HostId>
</Error>
The text was updated successfully, but these errors were encountered:
When we try to operate resources where the path contains special characters, it generates an incorrect signature.
There is a example in the
/tests/behavior/read_write_test.go#L78
Then we will receive:
The text was updated successfully, but these errors were encountered: