chibenwa commented on code in PR #2396:
URL: https://github.com/apache/james-project/pull/2396#discussion_r1735738523
##########
protocols/smtp/src/main/java/org/apache/james/protocols/smtp/core/esmtp/EhloCmdHandler.java:
##########
@@ -108,7 +109,11 @@ private boolean isValid(String argument) {
// CF JAMES-4046
https://issues.apache.org/jira/projects/JAMES/issues/JAMES-4066
private boolean isAlphanumeric(String hostname) {
- return hostname.matches("^[a-zA-Z0-9]+$");
+ return !hostname.isEmpty() &&
+ CharMatcher.inRange('a', 'z')
+ .or(CharMatcher.inRange('A', 'Z'))
+ .or(CharMatcher.inRange('0', '9'))
Review Comment:
The charmatcher shall be a constant
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]