-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the documentation for the sign parameter #5
base: master
Are you sure you want to change the base?
Conversation
Even thought the documentation says that you should include the leading "/" in practice you need to exclude it
@@ -70,17 +70,17 @@ Then a request path like: | |||
|
|||
will fail because the `sign` parameter is not present. | |||
|
|||
**The HMAC-SHA256 hash is created by taking the URL path (including the leading /), the request parameters (alphabetically-sorted and concatenated with & into a string). The hash is then base64url-encoded.** | |||
**The HMAC-SHA256 hash is created by taking the URL path (excluding the leading /), the request parameters (alphabetically-sorted and concatenated with & into a string). The hash is then base64url-encoded.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s weird because it breaks the imaginary
lib: https://github.com/h2non/imaginary?tab=readme-ov-file#url-signature.
I think we should maintain this contract by fixing this lib and making a major version release.
Can you add a test that shows the bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we want to stay compliant with h2non/imaginary
? I don't see any mention of that lib in the plug_image_processing
project. But yeah I don't mind changing this lib to keep it. I'll add a test for it !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a test that demonstrate that the "/" is excluded. I'll change the code (and the test) after you give me a 👍 that we want that !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even thought the documentation says that you should include the leading "/" in practice you need to exclude it.