admin管理员组文章数量:1327102
I am in a pickle now, about to release a Wordpress-based app and I can't get the registration complete because password set/reset key is sometimes invalid.
I say sometimes because when the user is registered, he gets link to set the password, and that is always invalid. Then he is asked to enter his username to reset the password and a new email is sent. That link is also invalid, however, if he requests a new password reset email again, then the link is valid.
The problem seems to be the key generated. When they key is clean of symbols, it works, example:
/?key=f2XFLHJGvemH&id=209
When the key is with symbols, it gets denied, example:
/?key=%sPRkgT7fW%5D@&id=209
I disabled all plugins and it acts the same way. No caching plugins installed.
What could be happening here? Please help!
Edit:
I repĺicated this behavior again to make sure, and this time it took 4 tries. So I am guessing that if you keep trying to get a clean key, it works. Why would this be happening?
I am in a pickle now, about to release a Wordpress-based app and I can't get the registration complete because password set/reset key is sometimes invalid.
I say sometimes because when the user is registered, he gets link to set the password, and that is always invalid. Then he is asked to enter his username to reset the password and a new email is sent. That link is also invalid, however, if he requests a new password reset email again, then the link is valid.
The problem seems to be the key generated. When they key is clean of symbols, it works, example:
https://www.example/account/reset/?key=f2XFLHJGvemH&id=209
When the key is with symbols, it gets denied, example:
https://www.example/account/reset/?key=%sPRkgT7fW%5D@&id=209
I disabled all plugins and it acts the same way. No caching plugins installed.
What could be happening here? Please help!
Edit:
I repĺicated this behavior again to make sure, and this time it took 4 tries. So I am guessing that if you keep trying to get a clean key, it works. Why would this be happening?
Share Improve this question edited Jan 31, 2020 at 19:07 Caio Mar asked Feb 28, 2019 at 15:55 Caio MarCaio Mar 4344 silver badges16 bronze badges1 Answer
Reset to default 1Problem solved!
I had a filter hooked onto random_password
filter to generate passwords with custom rules and get_password_reset_key
uses the function wp_generate_password
to generate the key, and that is why I was getting the behavior I was getting. Allz I had to do was to remove my filter from it, and bada bing bada boom, it works.
本文标签: user registrationInvalid key on activation and password reset
版权声明:本文标题:user registration - Invalid key on activation and password reset 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742204952a2432640.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论