You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All I did was look for regexes containing {2,6} knowing that was the way TLD was checked. (I didn't bother fixing the MSN one in that topic, as MSN is now dead)
Provisionally, {2,16} should fix it, I don't know any TLD longer than 16 characters (but I do know some in the 13-14 character range)
This might be useful to patch in 2.0.10, but for 2.1 I'd strongly suggest at the very least abstracting it to a function called isValidEmail() or similar so that if the rules change again in future, it can be updated without problem. In a really ideal world, this function would also use filter_var to handle the email since PHP can probably do a better job of it than a single regex can.
The text was updated successfully, but these errors were encountered:
…into theme_fix
# By John Rayes (2) and Michael Eshom (2)
# Via John Rayes (4) and Michael Eshom (3)
* 'release-2.1' of git://github.com/simplemachines/SMF2.1:
Tweak the display title (SimpleMachines#2319)
Use filter_var for email validation (fixesSimpleMachines#2321)
! Consistency is a good thing...
Yay for redundancy...
Applies to 2.0, seems to be present in 2.1, ref http://www.simplemachines.org/community/index.php?topic=527719.msg3742953#msg3742953
All I did was look for regexes containing
{2,6}
knowing that was the way TLD was checked. (I didn't bother fixing the MSN one in that topic, as MSN is now dead)Provisionally,
{2,16}
should fix it, I don't know any TLD longer than 16 characters (but I do know some in the 13-14 character range)This might be useful to patch in 2.0.10, but for 2.1 I'd strongly suggest at the very least abstracting it to a function called isValidEmail() or similar so that if the rules change again in future, it can be updated without problem. In a really ideal world, this function would also use filter_var to handle the email since PHP can probably do a better job of it than a single regex can.
The text was updated successfully, but these errors were encountered: