最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

user registration - Invalid key on activation and password reset

programmeradmin4浏览0评论

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 badges
Add a comment  | 

1 Answer 1

Reset to default 1

Problem 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.

发布评论

评论列表(0)

  1. 暂无评论