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

Increase amount of letters in EMAIL_DOMAIN_VALIDATION_PATTERN #3980

Closed
Kaik opened this issue Nov 1, 2019 · 6 comments
Closed

Increase amount of letters in EMAIL_DOMAIN_VALIDATION_PATTERN #3980

Kaik opened this issue Nov 1, 2019 · 6 comments
Labels
Bug
Milestone

Comments

@Kaik
Copy link
Contributor

@Kaik Kaik commented Nov 1, 2019

Q A
Zikula Version 1/2/3?
PHP Version NA

Expected Behavior

Be able to block new TLD's like .website

Current Behavior

Current TLD are restricted to max 6 chars

Possible Solution

Already mentioned I think the problem is because of this regex

public const EMAIL_DOMAIN_VALIDATION_PATTERN = '(?:[^\\s\\000-\\037\\177\\(\\)<>@,;:\\\\"\\[\\]]\\.?)+\\.[a-z]{2,6}';

@Kaik Kaik added the Bug label Nov 1, 2019
@Kaik

This comment has been minimized.

Copy link
Contributor Author

@Kaik Kaik commented Nov 1, 2019

Now I wonder if this is a bug or feature :)

@Kaik

This comment has been minimized.

Copy link
Contributor Author

@Kaik Kaik commented Nov 2, 2019

Since TLD's can be really long I think we should remove mentioned length condition.
https://stackoverflow.com/questions/9238640/how-long-can-a-tld-possibly-be

@Guite Guite added this to the 3.0.0 milestone Nov 2, 2019
@Guite

This comment has been minimized.

Copy link
Member

@Guite Guite commented Nov 2, 2019

@Kaik so your proposal is removing {2,6} entirely?
@craigh any opinion about this issue?

@craigh

This comment has been minimized.

Copy link
Member

@craigh craigh commented Nov 2, 2019

I have no opinion. I believe I just copied old work, so it is not my pattern. Even 1.3 is the same I think:

/**
 * The PCRE regular expression fragment used to validate e-mail address domains.
 */
const EMAIL_DOMAIN_VALIDATION_PATTERN = '(?:[^\s\000-\037\177\(\)<>@,;:\\\"\[\]]\.?)+\.[a-z]{2,6}';
@Guite

This comment has been minimized.

Copy link
Member

@Guite Guite commented Nov 2, 2019

Following the discussion linked above I guess we might change it to {2,64}?

@Kaik

This comment has been minimized.

Copy link
Contributor Author

@Kaik Kaik commented Nov 2, 2019

@Guite 👍 I guess that would be the best solution.
@craigh That pattern might be, really really old thing like postnuke old...

@Guite Guite closed this in ac651fe Nov 2, 2019
@Guite Guite modified the milestones: 3.0.0, 2.0.14 Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.