[wp-trac] [WordPress Trac] #39551: Angle Brackets on password reset email unnecessary and conflicting with some setups

WordPress Trac noreply at wordpress.org
Thu Jan 12 00:36:19 UTC 2017

#39551: Angle Brackets on password reset email unnecessary and conflicting with
some setups
 Reporter:  bmiller6686             |      Owner:
     Type:  defect (bug)            |     Status:  new
 Priority:  normal                  |  Milestone:  Awaiting Review
Component:  Login and Registration  |    Version:  4.6
 Severity:  normal                  |   Keywords:
  Focuses:                          |
 There is an inconsistency in how links are formatted when sent from system
 emails. For a new user being invited it is sent as
 Hi, You've been invited to join 'Blog Name' at blog_url with the role of
 role. If you do not want to join this site please ignore this email. This
 invitation will expire in a few days. Please click the following link to
 activate your user account: http://example.com/wp-

 Whereas on a password reset email, angle brackets surround the link with
 keys. I can't see a reason for this and the angle brackets can actually
 cause the link to be removed in some cases. Case in point right now on my
 setup, if I die just the $message portion in wp-login.php for a password
 reset, the link isn't present. If however I remove the angle brackets and
 die($message) in the same place, the link is present.

 The link not being present at all could be completely unique to my setup,
 but the lack of consistency between admin emails should probably be fixed,
 and the angle brackets seem unnecessary.

 This exists on line 332 of wp-login.php. The revised snippet is as

         $message .= '<' . network_site_url("wp-
 login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login')
 . ">\r\n";

         $message .= network_site_url("wp-
 login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login')
 . "\r\n";

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

More information about the wp-trac mailing list