?
avatar OctavianC
OctavianC
4 Apr 2018

Steps to reproduce the issue

Run code:

// There are dots at the end of the email
var_dump(JMailHelper::isEmailAddress('test@joomla.org....'));

Expected result

bool(false)

Actual result

bool(true)

System information (as much as possible)

3.8.6

Additional comments

Any reason why this has rtrim()?
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Mail/MailHelper.php#L156
I've traced it back to Joomla! 1.5.9 but I don't see it mentioned in the release notes

avatar OctavianC OctavianC - open - 4 Apr 2018
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Apr 2018
avatar brianteeman
brianteeman - comment - 4 Apr 2018

You would need to look in the comments for the commit. They are archived here
https://developer.joomla.org/joomlacode-archive/tracker-32.html

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2018
Status New Information Required
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2018
Category com_mailto
avatar OctavianC
OctavianC - comment - 4 Apr 2018

I did take a look but didn't find anything relevant. This personally feels like one of those bugs that was carried over without anyone noticing :) because:

$rule = JFormHelper::loadRuleType('email');
$field = new SimpleXMLElement('<field></field>');
var_dump($rule->test($field, 'test@joomla.org')); // this works
var_dump($rule->test($field, 'test@joomla.org.')); // this fails

Seems like an inconsistency in how MailHelper::isEmailAddress() is validating emails.

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2018
Status Information Required Discussion
avatar SharkyKZ
SharkyKZ - comment - 5 Apr 2018

Issue was related to OpenID:
https://developer.joomla.org/joomlacode-archive/issue-12217.html
http://joomlacode.org/gf/project/joomla/scmsvn/?action=browse&path=%2F&view=rev&revision=11380

Specifically, this part in OpenID plugin:

$response->email = str_replace( array('http://', 'https://'), '', $response->username );
$response->email = str_replace( '/', '-', $response->email );
$response->email .= '@openid.';
avatar OctavianC
OctavianC - comment - 5 Apr 2018

Thank you so much for digging this up!
Ok, so since this plugin no longer exists I assume I can create a MR to fix this and see if any test units are failing.

avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Apr 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-04-05 06:37:22
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2018
Closed_By franz-wohlkoenig joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 5 Apr 2018
avatar joomla-cms-bot
joomla-cms-bot - comment - 5 Apr 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Apr 2018

closed as having Pull Request #20080.

Add a Comment

Login with GitHub to post a comment