The Upload API request signing includes all passed parameters to the signing method, despite the documentation clearly states that All parameters added to the method call should be included except: file, cloud_name, resource_type and your api_key.
The server rejects signatures that include one of these values.
This breaks when a ResourceType field is non-empty in in an UploadParams struct for a request; it gets marshaled as resource_type and included in the signature, which doesn't match the server's logic.
See proposed fix #25
Describe the bug in a sentence or two.
…
Issue Type (Can be multiple)
[ ] Build - Cannot install or import the SDK
[ ] Performance - Performance issues
[x] Behaviour - Functions are not working as expected (such as generate URL)
[ ] Documentation - Inconsistency between the docs and behaviour
[ ] Other (Specify)
Steps to reproduce
Enter a ResourceType field that is non-empty in an UploadParams struct for a request, e.g. "video".
OS
[ ] Linux
[ ] Windows
[ ] macOS
[ ] Other (Specify)
[ ] All
Versions and Libraries (fill in the version numbers)
Cloudinary Go SDK Version - 1.1.0
GoLang Version - 1.15
Repository
If possible, please provide a link to a reproducible repository that showcases the problem
Bug report for Cloudinary Go SDK
The Upload API request signing includes all passed parameters to the signing method, despite the documentation clearly states that
All parameters added to the method call should be included except: file, cloud_name, resource_type and your api_key.
The server rejects signatures that include one of these values.This breaks when a
ResourceType
field is non-empty in in anUploadParams
struct for a request; it gets marshaled asresource_type
and included in the signature, which doesn't match the server's logic.See proposed fix #25
Describe the bug in a sentence or two.
…
Issue Type (Can be multiple)
Steps to reproduce
Enter a
ResourceType
field that is non-empty in anUploadParams
struct for a request, e.g. "video".OS
Versions and Libraries (fill in the version numbers)
Repository
If possible, please provide a link to a reproducible repository that showcases the problem