Skip to content

Escape $root_password during execs. #73

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
merged 1 commit into from
Aug 9, 2012
Merged

Escape $root_password during execs. #73

merged 1 commit into from
Aug 9, 2012

Conversation

razorsedge
Copy link
Contributor

Some characters used in a password can cause the shell in an exec to do
unexpected things unless the password is enclosed in single quotes.

Try putting ';' in the middle of your password to test how interestingly it fails.

@razorsedge
Copy link
Contributor Author

With single quotes, I believe puppet will then treat ${root_password} as a literal string?

@razorsedge
Copy link
Contributor Author

No need to escape the single quotes. Puppet is smarter than bash.

@branan
Copy link
Contributor

branan commented May 22, 2012

Please update the spec tests for your change. Currently they expect un-escaped passwords and will fail when run on your branch.

@razorsedge
Copy link
Contributor Author

Spec tests updated.

@razorsedge
Copy link
Contributor Author

@branan @bodepd, Is there anything else holding back merge of this pull request?

@bodepd
Copy link
Contributor

bodepd commented Jun 25, 2012

@razorsedge a general overcommitment from both of us, combined with a lack of automated integration tests :)

@branan
Copy link
Contributor

branan commented Jul 5, 2012

Sorry this got lost in the shuffle!

Unfortunately, it no longer merges cleanly. If you could squash your commits and rebase this I see no reason we can't merge it at that point.

Some characters used in a password can cause the shell in an exec to do
unexpected things unless the password is enclosed in single quotes.
Updated the rspec tests to deal with the password quoting.
@razorsedge
Copy link
Contributor Author

@branan

I finally found the time to work on this. And I think I managed to figure out rebasing.

bodepd added a commit that referenced this pull request Aug 9, 2012
Escape $root_password during execs.
@bodepd bodepd merged commit 3ffa0bd into puppetlabs:master Aug 9, 2012
@razorsedge razorsedge deleted the mysqladmin_passwd branch April 27, 2013 22:05
pmcmaw pushed a commit to pmcmaw/puppetlabs-mysql that referenced this pull request Mar 3, 2021
(FM-7720/FM-7722/FM-7723) Consolidate Windows Metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants