? ? Failure

User tests: Successful: Unsuccessful:

avatar astridx
astridx
5 Jan 2018

Summary of Changes

The url http://www.w3.org/TR/html-markup/input.email.html did not exist any more. The correct url is now https://www.w3.org/TR/html/sec-forms.html#email-state-typeemail

The label of an email
1*( atext / "." ) "@" label *( "." label )
is limited to a length of 63 characters by RFC 1034 section 3.5 (https://tools.ietf.org/html/rfc1034#section-3.5)

Testing Instructions

Create an user and use an email address with more than 63 characters. For example

test@1234abcdefghijklmnopqrstuvwyz0123456789abcdefghijklmnopqrstuvwyz.org
test@test.1234abcdefghijklmnopqrstuvwyz0123456789abcdefghijklmnopqrstuvwyz
test@1234abcdefghijklmnopqrstuvwyz0123456789abcdefghijklmnopqrstuvwyz.example.org

Expected result

I expect to see a warning and the email address should not be saved.

Actual result

No warning and the email address is saved.

If you apply this patch, you see the warning and the email address is not saved if you use an email address with more than 63 characters for label.
If you use an email address with less than 63 characters, for example

test@123abcdefghijklmnopqrstuvwyz0123456789abcdefghijklmnopqrstuvwyz.org
test@test.123abcdefghijklmnopqrstuvwyz0123456789abcdefghijklmnopqrstuvwyz
test@123abcdefghijklmnopqrstuvwyz0123456789abcdefghijklmnopqrstuvwyz.example.org

the email address is saved.

Documentation Changes Required

No

Todo

If you install Joomla, the email field is marked an invalid field, when you click in step 3 on "Install Joomla", but you see no warning that explains why the field is marked as invalid.

The same goes for Joomla version 3.

Addition: If we merge this we should do this for media/system/js/validate-uncompressed.js, too.

avatar astridx astridx - open - 5 Jan 2018
avatar astridx astridx - change - 5 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jan 2018
Category Libraries
avatar brianteeman
brianteeman - comment - 5 Jan 2018

Personally I would remove the email regex completely.and simply use the native PHP filter_var

avatar ReLater
ReLater - comment - 5 Jan 2018

Personally I would remove the email regex completely.and simply use the native PHP filter_var

Me, too, but
filter_var (FILTER_VALIDATE_EMAIL) doesn't support dotless domains.
https://secure.php.net/manual/en/filter.filters.validate.php

E.g. in a local environment dotless domains are common.

avatar brianteeman
brianteeman - comment - 5 Jan 2018

so take the other option - remove all validation. Leave it to the user to make sure they type their own email address correctly. The internet wastes far too much time writing regex for emails and then updating them etc etc

avatar brianteeman
brianteeman - comment - 6 Jan 2018

I was looking to see what has changed since j3

In J3 all validation was done by validation.js (which did have the character count)

It looks to me that the removal of that script is exposing a lot of different errors and instead of them all being reported one at a time - everything that was tested with validation.js in J3 should be checked in J4. Otherwise we are just adding bandaids

avatar astridx astridx - change - 19 Feb 2018
The description was changed
avatar astridx astridx - edited - 19 Feb 2018
avatar sanderpotjer
sanderpotjer - comment - 5 May 2019

@astridx thanks for your PR! Can you update the PR to solve the merge conflict? Thanks in advance :)

avatar astridx astridx - change - 6 May 2019
Labels Removed: J4 Issue
avatar astridx
astridx - comment - 6 May 2019
avatar sanderpotjer
sanderpotjer - comment - 6 May 2019

@astridx thanks! With the merge this change is lost:

The url http://www.w3.org/TR/html-markup/input.email.html did not exist any more. The correct url is now https://www.w3.org/TR/html/sec-forms.html#email-state-typeemail

avatar astridx
astridx - comment - 6 May 2019

I'm not good at resolving conflicts. Is there any interest for this function? Then I would close this PR and open a new one.

avatar sanderpotjer
sanderpotjer - comment - 6 May 2019

@astridx l do think it is good to fix this :-) I've made a Pull Request against your PR on astridx#1 If you merge that, this PR should be fine :)

avatar astridx
astridx - comment - 6 May 2019

@sanderpotjer Thank you

avatar eXsiLe95 eXsiLe95 - test_item - 2 Sep 2019 - Tested unsuccessfully
avatar eXsiLe95
eXsiLe95 - comment - 2 Sep 2019

I have tested this item 🔴 unsuccessfully on 2b05a3f

When creating an user with an invalid email address (e.g. test@123abcdefghijklmnopqrstuvwyz0123456789abcdefghijklmnopqrstuvwyzzzz.org, label has length of 66), the warning is shown but the user is still saved.

Result Screenshot

phpmyadmin


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19300.

avatar Schmidie64
Schmidie64 - comment - 2 Sep 2019

I would extend the problem of PR a bit more. The problem also occurs when updating a user.

After Click on the Save User Button (update)
error with existing user

System
PHP Build On: Windows NT 10.0 build 18362 (Windows 10) i586
10.1.37-MariaDB
PHP-Version: 7.3.0
Webserver: Apache/2.4.37 (Win32) OpenSSL/1.1.1a PHP/7.3.0
Joomla! Version: Joomla! 4.0.0-alpha12-dev Development [ Amani ] 19-August-2019 13:40 GMT
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

avatar astridx
astridx - comment - 10 Sep 2019

@eXsiLe95 Thank you for testing.
I just tested it myself again and you're right. The warning appears. The user is saved despite the warning.
Now I do not know how to continue. For my understanding, the user should not be saved if the RegX does not fit. And the RegX does not fit, because of the warning. The user was not saved when I created this PR. Is it possible that something else is wrong with the server-side validation?

@Schmidie64 You are right. I will do this, if this Pr is accepted :).

avatar uthorat uthorat - test_item - 19 Oct 2019 - Tested unsuccessfully
avatar uthorat
uthorat - comment - 19 Oct 2019

I have tested this item 🔴 unsuccessfully on 2b05a3f

after applying patch, user still getting the warning and user also get saved.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19300.

avatar vaibhavsTekdi vaibhavsTekdi - test_item - 19 Oct 2019 - Tested unsuccessfully
avatar vaibhavsTekdi
vaibhavsTekdi - comment - 19 Oct 2019

I have tested this item 🔴 unsuccessfully on 2b05a3f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19300.

avatar rajnish-dargan rajnish-dargan - test_item - 2 Nov 2019 - Tested successfully
avatar rajnish-dargan
rajnish-dargan - comment - 2 Nov 2019

I have tested this item ✅ successfully on 2b05a3f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19300.

avatar jwaisner
jwaisner - comment - 12 Feb 2020

@Quy Can you advise what updates need to be made to this PR?

avatar astridx
astridx - comment - 12 Feb 2020

@Quy Why did you set the Label "Updates Requested"?

avatar Quy
Quy - comment - 12 Feb 2020

@astridx Per your comment #19300 (comment)

avatar astridx astridx - change - 12 Feb 2020
Labels Added: ?
avatar astridx
astridx - comment - 12 Feb 2020

I just looked at this PR again. The behavior is now again as described in the test description. The user is not saved.

Users  New   tes   Administration(1)

The PR can be tested again.

avatar brianteeman brianteeman - test_item - 12 Feb 2020 - Tested successfully
avatar brianteeman
brianteeman - comment - 12 Feb 2020

I have tested this item ✅ successfully on af401a5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19300.

avatar jwaisner
jwaisner - comment - 13 Feb 2020

I have tested this item ✅ successfully on af401a5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19300.

avatar jwaisner jwaisner - test_item - 13 Feb 2020 - Tested successfully
avatar jwaisner jwaisner - change - 13 Feb 2020
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 13 Feb 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19300.

avatar richard67 richard67 - change - 16 Feb 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-02-16 15:58:50
Closed_By richard67
Labels Added: ?
Removed: ?
avatar richard67 richard67 - close - 16 Feb 2020
avatar richard67 richard67 - merge - 16 Feb 2020
avatar richard67
richard67 - comment - 16 Feb 2020

Thanks.

Add a Comment

Login with GitHub to post a comment