mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 22:45:03 -05:00
ftpserver: don't verify SMTP MAIL FROM names
Rely on tests asking the names to get refused instead - test servers should be as dumb as possible. Edited test 914, 955 and 959 accordingly. Closes #5639
This commit is contained in:
parent
54f21be2e3
commit
1535363e72
@ -8,6 +8,9 @@ SMTP
|
|||||||
#
|
#
|
||||||
# Server-side
|
# Server-side
|
||||||
<reply>
|
<reply>
|
||||||
|
<servercmd>
|
||||||
|
REPLY MAIL 501 not fine enough
|
||||||
|
</servercmd>
|
||||||
</reply>
|
</reply>
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -8,6 +8,9 @@ SMTP
|
|||||||
#
|
#
|
||||||
# Server-side
|
# Server-side
|
||||||
<reply>
|
<reply>
|
||||||
|
<servercmd>
|
||||||
|
REPLY MAIL 501 not fine enough
|
||||||
|
</servercmd>
|
||||||
</reply>
|
</reply>
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -8,6 +8,9 @@ SMTP
|
|||||||
#
|
#
|
||||||
# Server-side
|
# Server-side
|
||||||
<reply>
|
<reply>
|
||||||
|
<servercmd>
|
||||||
|
REPLY MAIL 501 not fine enough
|
||||||
|
</servercmd>
|
||||||
</reply>
|
</reply>
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -835,13 +835,8 @@ sub MAIL_smtp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Validate the from address (only <> and a valid email address inside
|
# this server doesn't "validate" MAIL FROM addresses
|
||||||
# <> are allowed, such as <user@example.com>)
|
if (length($from)) {
|
||||||
if (($from eq "<>") ||
|
|
||||||
(!$smtputf8 && $from =~
|
|
||||||
/^<([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})>$/) ||
|
|
||||||
($smtputf8 && $from =~
|
|
||||||
/^<([a-zA-Z0-9\x{80}-\x{ff}._%+-]+)\@(([a-zA-Z0-9\x{80}-\x{ff}-]+)\.)+([a-zA-Z]{2,4})>$/)) {
|
|
||||||
my @found;
|
my @found;
|
||||||
my $valid = 1;
|
my $valid = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user