[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 152/282: ftpserver: Corrected the e-mail address regex in MAIL_s
From: |
gnunet |
Subject: |
[gnurl] 152/282: ftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp() |
Date: |
Wed, 01 Apr 2020 14:30:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 80ccc26415f380b67a7f9da91ba0d216c3fc6e74
Author: Steve Holme <address@hidden>
AuthorDate: Mon Feb 10 20:50:50 2020 +0000
ftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp()
The dot character between the host and the tld was not being escaped,
which meant it specified a match of 'any' character rather than an
explicit dot separator.
Additionally removed the dot character from the host name as it allowed
the following to be specified as a valid address in our test cases:
<address@hidden>
Both are typos from 98f7ca7 and 8880f84 :(
I can't remember whether my intention was to allow sub-domains to be
specified in the host or not with these additional dots, but by placing
it outside of the host means it can only be specified once per domain
and by placing a + after the new grouping support for sub-domains is
kept.
Closes #4912
---
tests/ftpserver.pl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index ac02722e9..e815619d6 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
+# Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -828,7 +828,7 @@ sub MAIL_smtp {
# Validate the from address (only <> and a valid email address inside
# <> are allowed, such as <address@hidden>)
if ((!$from) || (($from ne "<>") && ($from !~
- /^<([a-zA-Z0-9._%+-]+)\@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})>$/))) {
+ /^<([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})>$/))) {
sendcontrol "501 Invalid address\r\n";
}
else {
@@ -872,7 +872,7 @@ sub RCPT_smtp {
# Validate the to address (only a valid email address inside <> is
# allowed, such as <address@hidden>)
if ($to !~
- /^<([a-zA-Z0-9._%+-]+)\@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})>$/) {
+ /^<([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})>$/) {
sendcontrol "501 Invalid address\r\n";
}
else {
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 143/282: tests: Added a unit test for SHA256 digest generation, (continued)
- [gnurl] 143/282: tests: Added a unit test for SHA256 digest generation, gnunet, 2020/04/01
- [gnurl] 144/282: digest: Corrected the name of the local HTTP digest function, gnunet, 2020/04/01
- [gnurl] 146/282: ntlm: Removed the dependency on the TLS libaries when using MD5, gnunet, 2020/04/01
- [gnurl] 147/282: test1610: Fixed the link to the unit test, gnunet, 2020/04/01
- [gnurl] 150/282: ntlm: Moved the HMAC MD5 function into the HMAC module as a generic function, gnunet, 2020/04/01
- [gnurl] 140/282: http2: now require nghttp2 >= 1.12.0, gnunet, 2020/04/01
- [gnurl] 123/282: socks: make the connect phase non-blocking, gnunet, 2020/04/01
- [gnurl] 145/282: md5/sha256: Updated the functions to allow non-string data to be hashed, gnunet, 2020/04/01
- [gnurl] 153/282: ftpserver: Updated VRFY_smtp() so the response isn't necessary in the test case, gnunet, 2020/04/01
- [gnurl] 148/282: md4: Use const for the length input parameter, gnunet, 2020/04/01
- [gnurl] 152/282: ftpserver: Corrected the e-mail address regex in MAIL_smtp() and RCTP_smtp(),
gnunet <=
- [gnurl] 155/282: url: Make the IDN conversion functions available to others, gnunet, 2020/04/01
- [gnurl] 159/282: smtp: Detect server support for the UTF-8 extension as defined in RFC-6531, gnunet, 2020/04/01
- [gnurl] 158/282: smtp: Support UTF-8 based host names in the VRFY command, gnunet, 2020/04/01
- [gnurl] 151/282: hmac: Added a unit test for the HMAC hash generation, gnunet, 2020/04/01
- [gnurl] 149/282: tests: Added a unit test for MD4 digest generation, gnunet, 2020/04/01
- [gnurl] 163/282: smtp: Support the SMTPUTF8 extension for the EXPN command, gnunet, 2020/04/01
- [gnurl] 162/282: smtp: Support the SMTPUTF8 extension in the VRFY command, gnunet, 2020/04/01
- [gnurl] 164/282: smtp: Tidy up, following recent changes, to maintain the coding style, gnunet, 2020/04/01
- [gnurl] 156/282: smtp: Support UTF-8 based host names in the MAIL command, gnunet, 2020/04/01
- [gnurl] 161/282: smtp: Support the SMTPUTF8 extension in the RCPT TO command, gnunet, 2020/04/01