From patchwork Tue Jun 18 17:55:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Marx X-Patchwork-Id: 2305 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id DC5A8887F07 for ; Tue, 18 Jun 2019 08:55:42 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 45SgP94ypKz581gq; Tue, 18 Jun 2019 08:55:41 +0100 (BST) Received: from EDV1.kappeln2011.lan (business-90-187-3-157.pool2.vodafone-ip.de [90.187.3.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 45SgP71w8Fz581gq; Tue, 18 Jun 2019 08:55:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904rsa; t=1560844539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=qpVgWitx1WmZ9Aj08TA8QIBKYx37P2m5/4mGqB1WjkA=; b=ByZJfzX3TutUBKZdYB9aQo9lSTILkIb1TiwafBih1XOz+IalvOlMO3q/ngcZJtun7PQ8FB AU++5pJjw01FLiOzyxTT0U9BQqkd1gzY+rmJLlJttSu81zpjLEKTzi1jNyPygK8ZCTNlpi sfZaXRw4fQpVjuceTS9fmgTFXccY4dH2A/rt5ir65Usi8dGZ3jcBKgxHim3BMoAZapB7Cb 68V4Ws1Tr7XsmiOQnTX7j7nAa2DTiG4uwG5t8UZXJkJ4rJtt3TfDgA8/u4Ia6nkzSXa8oi nocXvUmI5Rti1PaFaaWmVGJfZmL8+WSk05a3yp2b97fs5Ka+bRrKA6q7NtVE7g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201904ed25519; t=1560844539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=qpVgWitx1WmZ9Aj08TA8QIBKYx37P2m5/4mGqB1WjkA=; b=E8Syb2dWlhUvX2GGr7zR8VD9mZTDA7DaZHI4PMGVJ7FrZF4+oon4Iv2szUQpwJHd7nTC7J VBteSEDkzdi/pVAg== From: Alexander Marx To: development@lists.ipfire.org Subject: [PATCH] BUG12070: Its not possible to use the underscore in email addresses Date: Tue, 18 Jun 2019 09:55:35 +0200 Message-Id: <20190618075535.18313-1-alexander.marx@ipfire.org> X-Mailer: git-send-email 2.17.1 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=amarx smtp.mailfrom=alexander.marx@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Using IPFire's Mailservice does not allow to enter a senders mail address with the underscore. The function used to verify that is used from general-functions.pl. Now the function 'validemail' allows the underscore in the address. Fixes: #12070 --- config/cfgroot/general-functions.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 04e36969c..aefcfb687 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -784,7 +784,7 @@ sub validemail { return 0 if ( substr($parts[1],-1,1) eq '.' ); #check first addresspart (before '@' sign) - return 0 if ( $parts[0] !~ m/^[a-zA-Z0-9\.!\-\+#]+$/ ); + return 0 if ( $parts[0] !~ m/^[a-zA-Z0-9\.!\-\_\+#]+$/ ); #check second addresspart (after '@' sign) return 0 if ( $parts[1] !~ m/^[a-zA-Z0-9\.\-]+$/ );