[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 153/282: ftpserver: Updated VRFY_smtp() so the response isn't ne
From: |
gnunet |
Subject: |
[gnurl] 153/282: ftpserver: Updated VRFY_smtp() so the response isn't necessary in the test case |
Date: |
Wed, 01 Apr 2020 14:30:18 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 6995b77a52dc1fa9ed05567a52aa68142a57106c
Author: Steve Holme <address@hidden>
AuthorDate: Mon Feb 10 20:49:45 2020 +0000
ftpserver: Updated VRFY_smtp() so the response isn't necessary in the test
case
---
tests/data/test923 | 3 ---
tests/ftpserver.pl | 18 +++++++++++++++---
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/tests/data/test923 b/tests/data/test923
index cb811bb0e..9d9722f9a 100644
--- a/tests/data/test923
+++ b/tests/data/test923
@@ -9,9 +9,6 @@ VRFY
#
# Server-side
<reply>
-<data>
-250 <address@hidden>
-</data>
</reply>
#
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index e815619d6..6709769d7 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -1030,10 +1030,22 @@ sub VRFY_smtp {
sendcontrol "501 Unrecognized parameter\r\n";
}
else {
- my @data = getreplydata($smtp_client);
+ # Validate the username (only a valid local or external username is
+ # allowed, such as user or address@hidden)
+ if ($username !~
+ /^([a-zA-Z0-9._%+-]+)(\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4}))?$/) {
+ sendcontrol "501 Invalid address\r\n";
+ }
+ else {
+ my @data = getreplydata($smtp_client);
- for my $d (@data) {
- sendcontrol $d;
+ if(!@data) {
+ push @data, "250 <$username\@example.com>\r\n"
+ }
+
+ for my $d (@data) {
+ sendcontrol $d;
+ }
}
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 137/282: github action: add CIFuzz, (continued)
- [gnurl] 137/282: github action: add CIFuzz, gnunet, 2020/04/01
- [gnurl] 141/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [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 <=
- [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, 2020/04/01
- [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