aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-10-19 20:39:18 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-10-19 20:39:18 +0100
commit5b31b38c27bb7a0c496a36eda081a2fc9300796a (patch)
treef5a9f8d0d63d2ee64d3d44464134d4ac2856423a /tests
parent39f4e4fafae3765ee1d0e76cde5217aef4381f77 (diff)
ftpserver.pl: Fixed processing of POP3 authentication strings
...and corrected response when check fails from 500 to -ERR.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ftpserver.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index d0986ea77..5c5d19a53 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -3049,6 +3049,7 @@ while(1) {
sendcontrol "$1 '$full': command not understood.\r\n";
last;
}
+
$cmdid=$1; # set the global variable
$FTPCMD=$2;
$FTPARG=$3;
@@ -3057,6 +3058,16 @@ while(1) {
$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;