Password reset links do not work
wilirius opened this issue · comments
When a user tries to use forgot password, or the password is reset programmatically, the link they recieve in their email does not take them to the screen to input a new password. Tried on multiple installs, but I have not yet tested it on a blank install.
Has no one else had this issue?
I have this issue too how to fix this ? anybody help ?
Yes, if login is for example "Test test" with space between words, it doesnt work.
problem is in
parse_str( $args[1], $args );
which remove "%20" space..
There was issue with replace dots..:( for example if login was email, then user cannot set new password...
this code is working
// parse_str(urlencode($args[1]),$args);
$query_array = array();
$pairs = explode('&', $args[1]);
foreach ($pairs as $pair) {
$name_value = explode('=', $pair);
$name = urldecode($name_value[0]);
$value = urldecode($name_value[1]);
if ($value === '' && FALSE === strpos($args[1], $name . '=')) {
$value = NULL;
}
$query_array[$name] = rawurlencode($value);
}
$url = add_query_arg( $query_array, $this->new_login_url( $scheme ) );
Password reset links still do not work, but if using WooCommerce and rename-wp-login, then the password resets do work because WooCommerce takes over that operation and you go through their pages to do the reset. I've experienced this on a couple different hosts, and on dozens of websites.
Problem was, if login has space or special character ( only @ tested ) Posted code from 26 aug for me works ok. I have site about 10 000 users and now not problem :)
It was a caching issue.