BUG FOUND: lost password form outputting incorrect action url under Multisite
-
Hello guys, I’ve just found this bug happenning on WP Multisite when the Hide Backend feature is in place.
The issue only happens when you visit the Forgot Password link at
https://www.yourdomain.com/yourloginslug?action=lostpasswordIf you submit your username to start the recovery process, you will face an error 404 or 403, depending on what failover you choose in the Hide Backend screen.
And by seeking at the source code, I found the problem is pretty simple. If you lookup the form action in the ?action=lostpassword URL, you’ll find its output is:
<form name="lostpasswordform" id="lostpasswordform" action="https://yourdomain.com/wp-login.php?action=lostpassword" method="post">
but it really should be:
<form name="lostpasswordform" id="lostpasswordform" action="https://yourdomain.com/yourloginslug?action=lostpassword" method="post">
And in fact, if you edit that via console, you’ll make it work out of the box.
OF NOTE: I’ve tested it in several sites and it does happen with WordPress 4.5 and 4.6 and even if the Multisite is set to work with subfolders or subdomains, so it is something inherent to how WP handles the lostpassword form under Multisite that your plugin is not fully catching.
Can you fix this please? In large networks with lots of users this issue is a real annoyance because passwords must then be generated from the backend by an admin.
Thanks in advance
- The topic ‘BUG FOUND: lost password form outputting incorrect action url under Multisite’ is closed to new replies.