Run code:
// There are dots at the end of the email
var_dump(JMailHelper::isEmailAddress('test@joomla.org....'));
bool(false)
bool(true)
3.8.6
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
Labels |
Added:
?
|
Status | New | ⇒ | Information Required |
Category | ⇒ | com_mailto |
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:
JFormValidator doesn't accept test@joomla.org.
:
https://github.com/joomla/joomla-cms/blob/staging/media/system/js/validate-uncompressed.js#L213-L217
eg. try to create a new Joomla! user with that email address - it will fail validation client-side.
The EmailRule
class doesn't accept test@joomla.org.
:
https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Form/Rule/EmailRule.php
To test, run the following:
$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.
Status | Information Required | ⇒ | Discussion |
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.';
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.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-04-05 06:37:22 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/20075
You would need to look in the comments for the commit. They are archived here
https://developer.joomla.org/joomlacode-archive/tracker-32.html