Opened 3 months ago

Last modified 3 months ago

#23420 new enhancement

Lost password, invalid key - noticed something

Reported by: demonpengu Owned by:
Priority: normal Milestone: Awaiting Review
Component: Mail Version: 3.5.1
Severity: normal Keywords: close
Cc:

Description

Hi there,

I have noticed something about the lost password/email retrieval that may be a bug or may help out with the number of requests this gets.

The link sent with the key and user name is surrounded with < and >

Some email clients are misinterpreting this link and including the > at the end of the user name which in turn kills the database query because the user name does not match.

I have run a couple of tests changing line 235 of wp-login.php to be:

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

from

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

This seems to sort the problem out.

Change History (5)

What email clients have you experienced this with? Are you using any email-related plugins at all?

WordPress only uses plain text emails at present by default, and using < and > around links is the standard (for many many many years) on how to present longer links, without it, when the link gets broken up over multiple lines (which is almost a definite with plain text emails)only the first part of the link ends up getting linked in the email client, so really, they're required.

The only times I've seen this broken, is when using a plugin which adds HTML emails to WordPress, which causes the < and > to be interpreted as a HTML element.

  • Keywords close added

The link sent with the key and user name is surrounded with < and >

As noted by dd32, there's a reason for them to be there: #14140.

I wrote a couple of simple plugins to resolve this issue for some users on the support forums without hacking the core:

Replying to dd32:

The only times I've seen this broken, is when using a plugin which adds HTML emails to WordPress, which causes the < and > to be interpreted as a HTML element.

Related: #21095

Hi There,

No email plugins.

The Kerio webmail client certainly is a problem. I will have to go investigate the others.

Andy

  • Component changed from General to Mail
Note: See TracTickets for help on using tickets.