WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 8 months ago

#46186 closed defect (bug) (duplicate)

The Password reset email produces errors

Reported by: pepwave1 Owned by:
Milestone: Priority: normal
Severity: major Version:
Component: Mail Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

hello.
The password reset email produces errors on Safari and Chrome.
I am using WordPress 5.0.3 as part of a multi-site install.
It's a simple fix on line 369 by adding a space in front of the > so that the line reads:

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

What happens, otherwise, is that the > is added to the URL and that produces an error on the password reset page.

Attachments (1)

46186.diff (935 bytes) - added by sebastienserre 8 months ago.

Download all attachments as: .zip

Change History (3)

#1 @sebastienserre
8 months ago

  • Component changed from General to Login and Registration
  • Keywords 2nd-opinion added

Hello @pepwave1

Many thanks for your contribution.
I attached a patch that adding the needed space.

#2 @swissspidy
8 months ago

  • Component changed from Login and Registration to Mail
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @pepwave1 and welcome to Trac!

If some email service includes the ending bracket in the link, unfortunately there's not much we can do to fix that.

Gmail usually handles this just fine. Problems only occur when using a plugin which adds HTML emails to WordPress, which causes the < and > to be interpreted as a HTML element.

With that being said, this has been reported numerous times in the past. See #44589, #23578, #43206, #18493, #21095, #23420, #39742.

Note: See TracTickets for help on using tickets.