-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Installing WP using CLI, defining a password containing a single quote (it'sweird)
wp core install --url="http://domain.tld" \
--title="Innovative bottom-line flexibility" \
--admin_user="test.user" \
--admin_password="it'sweird" \
--admin_email="test.user@domain.tld" \
--path="/path/to/wp"
// WordPress installed successfully
Trying to login to /wp-admin with test.user / it'sweird doesn't work: so I decided to check the password using wp shell
$user = get_user_by('login', "test.user");
if ( $user && wp_check_password( "it'sweird", $user->data->user_pass, $user->ID) ) echo "seems ok";
// seems ok
After that, I decided to test with a password without single quote:
wp core install --url="http://domain.tld" \
--title="Innovative bottom-line flexibility" \
--admin_user="test.user" \
--admin_password="itsweird" \
--admin_email="test.user@domain.tld" \
--path="/path/to/wp"
// WordPress installed successfully
Checked password with wp shell: it's ok.
$user = get_user_by('login', "test.user");
if ( $user && wp_check_password( "itsweird", $user->data->user_pass, $user->ID) ) echo "seems ok";
// seems ok
Also the login using wp-admin is working as expected: editing password from UI using back it'sweird, logging out and logging in works without issue, so I suppose it's something not working with CLI...
Reactions are currently unavailable