mirror of
https://github.com/curl/curl.git
synced 2025-09-21 11:32:41 +03:00
ftpserver: Updated VRFY_smtp() so the response isn't necessary in the test case
This commit is contained in:
parent
80ccc26415
commit
6995b77a52
|
@ -9,9 +9,6 @@ VRFY
|
||||||
#
|
#
|
||||||
# Server-side
|
# Server-side
|
||||||
<reply>
|
<reply>
|
||||||
<data>
|
|
||||||
250 <recipient@example.com>
|
|
||||||
</data>
|
|
||||||
</reply>
|
</reply>
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1029,13 +1029,25 @@ sub VRFY_smtp {
|
||||||
if($username eq "") {
|
if($username eq "") {
|
||||||
sendcontrol "501 Unrecognized parameter\r\n";
|
sendcontrol "501 Unrecognized parameter\r\n";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# Validate the username (only a valid local or external username is
|
||||||
|
# allowed, such as user or user@example.com)
|
||||||
|
if ($username !~
|
||||||
|
/^([a-zA-Z0-9._%+-]+)(\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4}))?$/) {
|
||||||
|
sendcontrol "501 Invalid address\r\n";
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
my @data = getreplydata($smtp_client);
|
my @data = getreplydata($smtp_client);
|
||||||
|
|
||||||
|
if(!@data) {
|
||||||
|
push @data, "250 <$username\@example.com>\r\n"
|
||||||
|
}
|
||||||
|
|
||||||
for my $d (@data) {
|
for my $d (@data) {
|
||||||
sendcontrol $d;
|
sendcontrol $d;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user