[
https://issues.apache.org/jira/browse/JSPWIKI-1243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18038614#comment-18038614
]
Alex O'Ree commented on JSPWIKI-1243:
-------------------------------------
commons-validation has an email validator. seems better to have a managed
solution. i checked the source, it's the simple variety but it'll address the
issue
> The email validation routine is incorrect
> -----------------------------------------
>
> Key: JSPWIKI-1243
> URL: https://issues.apache.org/jira/browse/JSPWIKI-1243
> Project: JSPWiki
> Issue Type: Bug
> Reporter: Alex O'Ree
> Priority: Major
>
> the current email validation is regex based.
> > ^[0-9a-zA-Z-_.+]+@([0-9a-zA-Z-_]+\\.)+[a-zA-Z]+$
> which...is fine it will block many legitimate email addresses
> there's a lengthy discussion here
> [https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression]
>
> to fix, we can either use the java api as a "more or less good enough
> solution" or turn this into something stupid simple like, it needs at least
> one character, followed by the at symbol, followed by at last least one more
> symbol.
> issues with the current setup
> * unicode, non-ascii characters, emojis (yes they can be in email addresses)
> and i'm not sure but i think ip addresses may fail on this one.
> the RFC is very complex and what we have is fine for users with ascii email
> addresses but that's a smaller percentage of the global population.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)