Site Links
Home
Features
Pricing & Order
Documentation
Support Options
Member Area
UBBDev.com
UBBWiki.com
Who's Online Now
1 registered members (GregSan), 69 guests, and 199 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Posts: 458
Joined: August 2004
Show All Member Profiles 
Top Posters(30 Days)
isaac 25
Gizmo 18
Ruben 10
driv 9
Conrad 3
JAISP 2
Morgan 2
Latest Photos
Trees
Retreats
Rooms
Big stuff
Test
Previous Thread
Next Thread
Print Thread
[FIXED for 7.7.2] New TLDs support in email addresses #262693 05/10/19 10:52 AM
Joined: May 2019
Posts: 2
GregSan Online Content OP
Stranger
OP Online Content
Stranger
Joined: May 2019
Posts: 2
Hi all,

After searching here, I haven't found much about this.

As of 7.7.2, I couldn't register on this forum using my email address (ending in ".paris", one of the numerous TLDs now in the wild) as it's considered "invalid".
Is it a deliberate choice ? or just a slip of a too restrictive regex ?

Thanks for your help

Express Hosting
Re: [FIXED for 7.7.2] New TLDs support in email addresses [Re: GregSan] #262694 05/10/19 11:19 AM
Joined: Apr 2004
Posts: 1,377
isaac Offline
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,377
Beyond adding an HTML5 email type to the input, the current regex hasnt been updated since at least the past 5 years (that I'm aware of) is:
Code
#^[+_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$#i

It looks like it's only accepting a TLD of 2 - 4 chars. "paris" is 5, so it is determined to be invalid.


Using regex for modern email validation is quite messy. Moving forward, PHP will be used to handle submitted HTML from the end user.
Code
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
	return array(false, 'BAD_FORMAT');
}
https://www.php.net/manual/en/function.filter-var.php

...and HTML5 input type=email will catch the user entry from the input field.
In Opera it's sufficient to enter just *@* for the input to be accepted. In Safari, Chrome and Firefox you need to enter at least *@-.-. Obviously neither example is very limiting, but it will prevent people from entering completely wrong values, such as phone number, strings with multiple '@'s or spaces.


Thanks for catching and reporting this. it should be corrected with the UBB.thread 7.7.2 release!


isaac @ id242.com // my forum @ CelicaHobby.com
a current developer of UBB.threads php forum software // 7.7.2 Progress Notes
Re: [FIXED for 7.7.2] New TLDs support in email addresses [Re: GregSan] #262695 05/10/19 01:54 PM
Joined: May 2019
Posts: 2
GregSan Online Content OP
Stranger
OP Online Content
Stranger
Joined: May 2019
Posts: 2
Yay, thanks for your help :-)


ShoutChat Box
Today's Birthdays
No Birthdays
Recent Topics
7.7.1 forgotten? //$reply = "off";
by BlackMale - 05/13/19 07:25 PM
[FIXED for 7.7.2] 7.7.1 /admin/edit_subscrip
tion.php

by BlackMale - 05/11/19 08:35 AM
http issues
by justwilliams - 05/10/19 09:20 AM
Open div
by AllenAyres - 05/09/19 01:17 PM
Forum Statistics
Forums35
Topics35,292
Posts192,448
Members12,166
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.7.2
(Snapshot build 20190501)