Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Over-long TLDs not recognised #2321

Closed
Arantor opened this issue Sep 14, 2014 · 0 comments
Closed

Over-long TLDs not recognised #2321

Arantor opened this issue Sep 14, 2014 · 0 comments
Assignees
Milestone

Comments

@Arantor
Copy link
Contributor

Arantor commented Sep 14, 2014

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.

@live627 live627 self-assigned this Sep 15, 2014
@live627 live627 added this to the Beta 1 milestone Sep 15, 2014
XinYenFon added a commit to XinYenFon/kittenground that referenced this issue Sep 15, 2014
…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  (fixes SimpleMachines#2321)
  ! Consistency is a good thing...
  Yay for redundancy...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants