mirror of
https://github.com/curl/curl.git
synced 2026-07-26 13:37:21 +03:00
ftpserver.pl: Fixed processing of POP3 authentication strings
...and corrected response when check fails from 500 to -ERR.
This commit is contained in:
parent
39f4e4fafa
commit
5b31b38c27
1 changed files with 11 additions and 0 deletions
|
|
@ -3049,6 +3049,7 @@ while(1) {
|
||||||
sendcontrol "$1 '$full': command not understood.\r\n";
|
sendcontrol "$1 '$full': command not understood.\r\n";
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmdid=$1; # set the global variable
|
$cmdid=$1; # set the global variable
|
||||||
$FTPCMD=$2;
|
$FTPCMD=$2;
|
||||||
$FTPARG=$3;
|
$FTPARG=$3;
|
||||||
|
|
@ -3057,6 +3058,16 @@ while(1) {
|
||||||
$FTPCMD=$1;
|
$FTPCMD=$1;
|
||||||
$FTPARG=$3;
|
$FTPARG=$3;
|
||||||
}
|
}
|
||||||
|
elsif($proto eq "pop3") {
|
||||||
|
# POP3 long "commands" are base64 authentication data
|
||||||
|
unless($full =~ /^[A-Z0-9+\/]+={0,2}$/i)) {
|
||||||
|
sendcontrol "-ERR '$full': command not understood.\r\n";
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
|
||||||
|
$FTPCMD=$full;
|
||||||
|
$FTPARG="";
|
||||||
|
}
|
||||||
elsif(($proto eq "smtp") && ($full =~ /^[A-Z0-9+\/]{0,512}={0,2}$/i)) {
|
elsif(($proto eq "smtp") && ($full =~ /^[A-Z0-9+\/]{0,512}={0,2}$/i)) {
|
||||||
# SMTP long "commands" are base64 authentication data.
|
# SMTP long "commands" are base64 authentication data.
|
||||||
$FTPCMD=$full;
|
$FTPCMD=$full;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue