Revert to original stringify params method#2
Open
joe-pritchard wants to merge 5 commits intostevechilds:stablefrom
Open
Revert to original stringify params method#2joe-pritchard wants to merge 5 commits intostevechilds:stablefrom
joe-pritchard wants to merge 5 commits intostevechilds:stablefrom
Conversation
The way the params were stringified in the original repo is actually preferable, as using your way the created signatures are invalid when your params have spaces or other non-url safe characters in them. I've verified this on the InboundShipments Api methods where I was pushing SKUs containing spaces and forward slashes. With the method like this it works, and with the modified version you either end up double-encoding or you get an invalid signature error and the call fails
Revert to the original parameter stringify method
It's okay for shipmentID not to be set as long as time constraints are set
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The way the params were stringified in the original repo is actually preferable, as using http_build_query the created signatures are invalid when your params have spaces or other non-url safe characters in them. I've verified this on the InboundShipments Api where I was pushing SKUs containing spaces and forward slashes.
With the method like this it works, and with the modified version using http_build_query you either end up double-encoding or you get an invalid signature error and the call fails.
I'm using your fork in order to get the code-based marketplace configuration (great work, thanks!) but need this changed back in order to continue with it. Its a trivial change which shouldn't really affect anything else...
Cheers :)
Joe