Skip to content

Fix encoding issue when secret key contains plus sign #875

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

Merged

Conversation

oshmyheliuk
Copy link
Contributor

Description

If some of the REMOTE_STORAGE_ options contain + sign inside value the tests running will fail as here https://github.com/magento-commerce/magento2-functional-testing-framework/blob/develop/etc/config/command.php#L15 urldecode will remove pluses + from command and setup:config:set --remote-storage-driver=... will fail with Too many arguments, expected arguments "command".

I got this issue as the current REMOTE_STORAGE_AWSS3_SECRET_KEY value contains two + signs.
I tried, with single quotes or double quotes but they are ignored and option values in command passing without quotes.

For example, I’ve set:

REMOTE_STORAGE_AWSS3_ACCESS_KEY='AKIAAFIELSFN+FNM7S2T+VORAXPQ'

command.php received:

php bin/magento setup:config:set ... --remote-storage-key=AKIAAFIELSFN+FNM7S2T+VORAXPQ

and after urldecode will be

php bin/magento setup:config:set ... --remote-storage-key=AKIAAFIELSFN FNM7S2T VORAXPQ

Fixed Issues (if relevant)

  1. magento/magento2-functional-testing-framework#<issue_number>: Issue title
  2. ...

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/verification tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)
  • Changes to Framework doesn't have backward incompatible changes for tests or have related Pull Request with fixes to tests

@jilu1
Copy link
Contributor

jilu1 commented Dec 8, 2021

@oshmyheliuk
Thank you for fixing the issue and submit the pull request!

@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework

@m2-github-services
Copy link

@jilu1 the Pull Request is successfully imported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants