[wp-trac] [WordPress Trac] #54685: Admin email verification redirects back to login page

WordPress Trac noreply at wordpress.org
Thu Dec 23 00:53:16 UTC 2021


#54685: Admin email verification redirects back to login page
----------------------------+-----------------------------
 Reporter:  golenkovm       |      Owner:  (none)
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  General         |    Version:  5.8.1
 Severity:  normal          |   Keywords:
  Focuses:  administration  |
----------------------------+-----------------------------
 Hi everyone,

 Recently, our admins started to getting `Administration email
 confirmation` on logon. However, after clicking on `This email is correct`
 admins are redirected back to login page and asked to login again. We've
 tried many times and it's an infinite loop of logging in, confirming email
 address, redirecting back to login page, logging in, confirming email
 addres, redirecting to login page and so on.

 We use login URL configured on the /wp-admin/options-general.php?page
 =move-login page and it seems like WP doesn't properly handle admin email
 confirmation when login URL is set. I had a look at the codebase and I
 believe this `?action=confirm_admin_email` string parameter gets lost when
 webserver redirects `wp-login.php` to configured login page:
 https://github.com/WordPress/WordPress/blob/b788e6255a97dbdd1dc55d42f8fbeeb66c806214
 /wp-login.php#L623

 I added one more hidden input same way as `redirect_to` is implemented
 https://github.com/WordPress/WordPress/blob/b788e6255a97dbdd1dc55d42f8fbeeb66c806214
 /wp-login.php#L635 and this fixed the issue.

 I'm happy to attach a patch file.

 Kind regards,
 Mikhail Golenkov

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54685>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list