Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 93505 invoked from network); 17 Mar 2011 12:06:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Mar 2011 12:06:51 -0000 Received: (qmail 27738 invoked by uid 500); 17 Mar 2011 12:06:51 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 27681 invoked by uid 500); 17 Mar 2011 12:06:51 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 27673 invoked by uid 99); 17 Mar 2011 12:06:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2011 12:06:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Mar 2011 12:06:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B0C9E3AD4AE for ; Thu, 17 Mar 2011 12:06:29 +0000 (UTC) Date: Thu, 17 Mar 2011 12:06:29 +0000 (UTC) From: "Nick Burch (JIRA)" To: issues@commons.apache.org Message-ID: <1465452527.8686.1300363589720.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1575763363.7145.1300300769868.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (VALIDATOR-292) [PATCH] @localhost and @localhost.localdomain email addresses aren't correctly detected as valid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VALIDATOR-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007896#comment-13007896 ] Nick Burch commented on VALIDATOR-292: -------------------------------------- Chatting about this with a couple of other users yesterday, I now think that perhaps this needs to be an option. For a dev environment, or maybe for an intranet setup, you might well want to declare @localhost email addresses to be valid ones. (I certainly do want them to be valid for my use case) However, for a public, internet facing application, you probably don't want to allow public users to set an @localhost email address, so for that use case you don't want them to be declared as valid. Maybe the solution is to have two methods. isValid(String) would continue to work as before. isValidLocal(String) would accept @localhost, @localhost.localdomain, and @ forms. If you only want valid + public email addresses, you'd then continue to use isValid as now. If you'd like to also allow local email addresses, you can additionally call the local one. Any thoughts? > [PATCH] @localhost and @localhost.localdomain email addresses aren't correctly detected as valid > ------------------------------------------------------------------------------------------------ > > Key: VALIDATOR-292 > URL: https://issues.apache.org/jira/browse/VALIDATOR-292 > Project: Commons Validator > Issue Type: Bug > Components: Routines > Affects Versions: 1.4 > Reporter: Nick Burch > Attachments: CommonsValidatorLocalhost.patch > > > Email addresses of the form @localhost and @localhost.localdomain are valid, but the Email Validator doesn't detect this. > The attached patch fixes the underlying issue in the domain validator, and adds unit tests for Domain + Email validation of these. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira