? Success

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
23 Oct 2014

Former patches did not let enter emails of type myname@domain.edu.co (double dotted domains)

This will let them saved OK.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar infograf768 infograf768 - open - 23 Oct 2014
avatar infograf768 infograf768 - change - 23 Oct 2014
Title
[Fix} Mail: allow domains as domain.edu.co
[Fix] Mail: allow domains as domain.edu.co
avatar wilsonge
wilsonge - comment - 23 Oct 2014

test: emails with 2 fullstops in domain work. A selection of other emails also seem to pass without any issues.

avatar wilsonge wilsonge - test_item - 23 Oct 2014 - Tested successfully
avatar MAT978 MAT978 - test_item - 23 Oct 2014 - Tested successfully
avatar MAT978
MAT978 - comment - 23 Oct 2014

@test

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.

avatar infograf768
infograf768 - comment - 24 Oct 2014

In fact this does not validate as @domain is not accepted. See /tests/unit/suites/libraries/joomla/form/rule/JFormRuleEmailTest.php
( array('test3@localhost', false), )

avatar infograf768 infograf768 - change - 24 Oct 2014
Title
[Fix} Mail: allow domains as domain.edu.co
[Fix] Mail: allow domains as domain.edu.co
Labels Added: ?
avatar infograf768
infograf768 - comment - 24 Oct 2014

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),

avatar infograf768
infograf768 - comment - 24 Oct 2014

The question, in fact, is:
"Shall we authorise or not domains without a suffix?"

avatar MAT978
MAT978 - comment - 24 Oct 2014

"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)

avatar brianteeman
brianteeman - comment - 24 Oct 2014

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).

avatar infograf768
infograf768 - comment - 24 Oct 2014

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

avatar wilsonge
wilsonge - comment - 24 Oct 2014

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)

avatar phproberto
phproberto - comment - 24 Oct 2014

:+1: to support domains without dots. We should not restrict email addresses more than the standards

avatar infograf768
infograf768 - comment - 24 Oct 2014

Let's see if test pass this time. :)

avatar infograf768
infograf768 - comment - 24 Oct 2014

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.

avatar rdeutz
rdeutz - comment - 24 Oct 2014

looked into it and have send a PR to your branch JM

avatar infograf768
infograf768 - comment - 25 Oct 2014

@rdeutz
Have you got a reference concerning the validity of domain.c ?

avatar infograf768
infograf768 - comment - 25 Oct 2014

Merged Robert pull after discussion on skype

avatar infograf768 infograf768 - reference | 9be642f - 25 Oct 14
avatar infograf768 infograf768 - merge - 25 Oct 2014
avatar infograf768 infograf768 - close - 25 Oct 2014
avatar infograf768 infograf768 - close - 25 Oct 2014
avatar infograf768 infograf768 - change - 25 Oct 2014
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-10-25 10:21:28
avatar rvbgnu rvbgnu - reference | feb6ce4 - 5 Nov 14
avatar rdeutz rdeutz - change - 3 Feb 2015
Milestone Added:

Add a Comment

Login with GitHub to post a comment