Skip to content

Signature needs to be escaped for POST methods #15

@jordanmhiller

Description

@jordanmhiller

Amazon::MWS::Routines::sign_request sometimes pads the signature with "=", but it neglects to escape the signature when included in the request body.

For example, when trying to use CreateInboundShipmentPlan I received the following error from Amazon:

<?xml version="1.0"?> <ErrorResponse xmlns="https://mws.amazonservices.com/"> <Error> <Type>Sender</Type> <Code>InvalidParameterValue</Code> <Message>Invalid query string provided - AWSAccessKeyId=...&amp;Signature=...A= is not valid; the value of a query string parameter may not contain a &apos;=&apos; delimiter</Message> </Error> <RequestID>...</RequestID> </ErrorResponse>

The attached patch seems to solve the issue for me.

Routines.pm.patch.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions