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

Escape values to avoid breaking them within single quotes #95

Merged
merged 3 commits into from
Jan 6, 2022

Conversation

schlessera
Copy link
Member

As the values provided through the user's arguments are printed within single quotes in the wp-config.php file's defines, we need to escape them properly to avoid breaking these single quoted strings.

This is a stop-gap measure to fix the bug reported in #93, but the proper solution would be to rewrite according to #94 and centralize all validation and escaping in wp-cli/wp-config-transformer.

Fixes #93

@schlessera schlessera requested a review from a team as a code owner July 16, 2019 16:16
@schlessera schlessera force-pushed the 93-escape-config-values branch 2 times, most recently from 7980bad to 296937c Compare December 24, 2021 01:26
@schlessera schlessera force-pushed the 93-escape-config-values branch from 296937c to 44abadc Compare January 6, 2022 14:42
@schlessera schlessera added this to the 2.1.2 milestone Jan 6, 2022
@schlessera schlessera merged commit b26c4fd into master Jan 6, 2022
@schlessera schlessera deleted the 93-escape-config-values branch January 6, 2022 15:08
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.

wp config create: passwords with single quotes breaks wp-config.php
1 participant