Skip to content
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

[action] set_pod_key: remove shellescape of params #16421

Merged
merged 1 commit into from
May 12, 2020

Conversation

arnauddorgans
Copy link
Contributor

@arnauddorgans arnauddorgans commented May 4, 2020

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

I use cocoapods-keys to store API keys but using set_pod_key action automatically escapes the provided parameters.
So each time I provide an API key that contains escapable characters, the API key becomes malformed.

Description

Remove shellescape

Testing Steps

Before:

set_pod_key(key: "PublicKey", value: "XXXX|XXXX", project: "Y")
set_pod_key(key: "ApiKey", value: "XX/nXX==-XX", project: "Y")

Capture d’écran 2020-05-04 à 14 44 37_censored

After:

set_pod_key(key: "PublicKey", value: "XXXX|XXXX", project: "Y")
set_pod_key(key: "ApiKey", value: "XX/nXX==-XX", project: "Y")

Capture d’écran 2020-05-04 à 14 43 45_censored

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@arnauddorgans
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels May 4, 2020
@janpio janpio changed the title Add set_pod_key skip_escape parameter [action] set_pod_key: Add skip_escape parameter May 6, 2020
@janpio
Copy link
Member

janpio commented May 6, 2020

Are you sure the current behavior is not just a bug that should be fixed? (I am missing the context what this is usually used for)

@arnauddorgans
Copy link
Contributor Author

arnauddorgans commented May 6, 2020

@janpio You are right, there is no point to shellescape parameters, event if we directly call the action from terminal we have to escape our values first otherwise the command will fail.

Test:
fail
success

I did update the PR with the shellescape deletion

@arnauddorgans arnauddorgans changed the title [action] set_pod_key: Add skip_escape parameter [action] set_pod_key: shellescape deletion May 6, 2020
@janpio janpio requested a review from joshdholtz May 9, 2020 15:03
@janpio janpio changed the title [action] set_pod_key: shellescape deletion [action] set_pod_key: remove shellescape of params May 9, 2020
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me! The shellescape was definitely not needed since it was already wrapped in quotes 🤷‍♂️ Thanks for fixing! ❤

@joshdholtz joshdholtz merged commit 63561b4 into fastlane:master May 12, 2020
Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.147.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants