ftpserver.pl: Added mailbox check to IMAP SELECT handler
This commit is contained in:
parent
4ba3b6c05a
commit
e9cca79dd1
@ -844,11 +844,15 @@ sub LOGIN_imap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub SELECT_imap {
|
sub SELECT_imap {
|
||||||
my ($testno) = @_;
|
my ($mailbox) = @_;
|
||||||
fix_imap_params($testno);
|
fix_imap_params($mailbox);
|
||||||
|
|
||||||
logmsg "SELECT_imap got test $testno\n";
|
logmsg "SELECT_imap got test $mailbox\n";
|
||||||
|
|
||||||
|
if($mailbox eq "") {
|
||||||
|
sendcontrol "$cmdid BAD Command Argument\r\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
# Example from RFC 3501, 6.3.1. SELECT Command
|
# Example from RFC 3501, 6.3.1. SELECT Command
|
||||||
sendcontrol "* 172 EXISTS\r\n";
|
sendcontrol "* 172 EXISTS\r\n";
|
||||||
sendcontrol "* 1 RECENT\r\n";
|
sendcontrol "* 1 RECENT\r\n";
|
||||||
@ -859,7 +863,8 @@ sub SELECT_imap {
|
|||||||
sendcontrol "* OK [PERMANENTFLAGS (\\Deleted \\Seen \\*)] Limited\r\n";
|
sendcontrol "* OK [PERMANENTFLAGS (\\Deleted \\Seen \\*)] Limited\r\n";
|
||||||
sendcontrol "$cmdid OK [READ-WRITE] SELECT completed\r\n";
|
sendcontrol "$cmdid OK [READ-WRITE] SELECT completed\r\n";
|
||||||
|
|
||||||
$selected = $testno;
|
$selected = $mailbox;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user