Closed
Description
Hello,
When i had secret with an "+" in the DSN, the print_r in this file show me a space : https://github.com/php-enqueue/sqs/blob/master/SqsConnectionFactory.php#L61
Array
(
[key] => NOTEXIST
[secret] => uQLwixxVbX0bmCVI9RMvx A4LDxKRc5YcIy1xepe
[token] =>
[region] => eu-west-1
[retries] => 3
[version] => 2012-11-05
[lazy] =>
[endpoint] =>
)
This space generate 403 error in SQS api:
Error executing "CreateQueue" on "https://sqs.eu-west-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://sqs.eu-west-1.amazonaws.com` resulted in a `403 Forbidden` response:
<?xml version="1.0"?><ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/"><Error><Type>Sender</Type><Code>S (truncated...)
SignatureDoesNotMatch (client): The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for d
etails.
I regenerated multiple access keys to got one without + in the secret. I think the cause is the parse_url here : https://github.com/php-enqueue/enqueue-dev/blob/master/pkg/sqs/SqsConnectionFactory.php#L137
I think we can use replace function but it's maybe there are other char other than + with this issue.