User tests: Successful: Unsuccessful:
Former patches did not let enter emails of type myname@domain.edu.co
(double dotted domains)
This will let them saved OK.
Title |
|
able to reproduce then #4905 works as expected with double dotted domains AND without like contact@test
thanks
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4905.
Title |
|
||||||
Labels |
Added:
?
|
I corrected the helper but the validation is still wrong, I guess because of the code in:
/Applications/MAMP/htdocs/trunkgitnew/libraries/joomla/form/rule/email.php
We could return false there if the domain does not contain a dot.
$atIndex = strrpos($value, '@');
$domain = substr($value, $atIndex + 1);
// Check if domain contains a dot
$domainDot = strstr($domain, '.');
if ($domainDot === false)
{
return false;
}
What do you think?
I am a bit confused by the code in /tests/unit/suites/libraries/joomla/form/rule/JFormRuleEmailTest.php
we have there
array('firstname@localhost', true)
array('test@example.com,test2@example.com,test3@localhost', true)
but
array('test3@localhost', false),
The question, in fact, is:
"Shall we authorise or not domains without a suffix?"
"Shall we authorise or not domains without a suffix?"
I am not an expert but I don't see why we should not?
I may be wrong but it seems to me that this is even useful in some cases (I can't find anymore why but I think it has to do with local servers)
It is very useful where Joomla is used on an intranet where they might use
internal addresses such as name@company
On 24 Oct 2014 11:17, "Marc-Antoine" notifications@github.com wrote:
"Shall we authorise or not domains without a suffix?"
I am not an expert but I don't see why we should not?
I may be wrong but it seems to me that this is even useful in some cases
(I can't find anymore why but I think it has to do with local servers)—
Reply to this email directly or view it on GitHub
#4905 (comment).
If all agree, I will then revert
infograf768@b7621c2
and we just have to correct the validation to be always true in
/tests/unit/suites/libraries/joomla/form/rule/JFormRuleEmailTest.php
I think there are valid reasons why these should not validate (e.g. http://www.symantec.com/connect/blogs/important-changes-ssl-certificates-intranets-what-you-need-know)
to support domains without dots. We should not restrict email addresses more than the standards
Let's see if test pass this time. :)
WE still have
1) JFormRuleEmailTest::testEmailData3 with data set #2 ('test3@example.c', false)
test3@example.c should have returned false but did not
Failed asserting that true matches expected false.
not passing.
looked into it and have send a PR to your branch JM
Merged Robert pull after discussion on skype
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-10-25 10:21:28 |
Milestone |
Added: |
test: emails with 2 fullstops in domain work. A selection of other emails also seem to pass without any issues.