...and corrected response when check fails from 500 to -ERR.
sendcontrol "$1 '$full': command not understood.\r\n";
last;
}
+
$cmdid=$1; # set the global variable
$FTPCMD=$2;
$FTPARG=$3;
$FTPCMD=$1;
$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)) {
# SMTP long "commands" are base64 authentication data.
$FTPCMD=$full;