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

Fix regex for closing syntax in string #9

merged 4 commits into from Nov 9, 2018


2 participants
Copy link

fjarrett commented Nov 7, 2018

Long story short of this is that occassionally the ) and ; chars will end up right next to one another during salt generation and this will cause things to blow up badly.

The root of the problem was not preferring string values within quotes first before attempting to match everything within the statement. So this PR improves the regex to do just that.

Consider the following constant value in wp-config.php:

define( 'AUTH_SALT', 'abc);123' ); // <--- a perfectly valid salt value

If you try to run $ wp config shuffle-salts you will get a success in the console but your site will break in dramatic fashion.

@schlessera schlessera added the bug label Nov 9, 2018

@schlessera schlessera added this to the 1.2.3 milestone Nov 9, 2018

@schlessera schlessera merged commit d1a82e1 into wp-cli:master Nov 9, 2018

2 checks passed

DEP All dependencies are resolved
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link

schlessera commented Nov 9, 2018

Pushed bugfix to new release v1.2.3.


This comment has been minimized.

Copy link

fjarrett commented Nov 9, 2018

Thank you, @schlessera!

@fjarrett fjarrett deleted the fjarrett:fix-regex-for-closing-syntax-in-string branch Nov 9, 2018

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