mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
imap: Fixed ftpserver.pl to allow verification even through LIST command
Commit 198012ee
inadvertently broke LIST_imap().
This commit is contained in:
parent
5c89413b24
commit
81408d2111
@ -940,9 +940,20 @@ sub STORE_imap {
|
|||||||
sub LIST_imap {
|
sub LIST_imap {
|
||||||
my ($args) = @_;
|
my ($args) = @_;
|
||||||
my ($reference, $mailbox) = split(/ /, $args, 2);
|
my ($reference, $mailbox) = split(/ /, $args, 2);
|
||||||
|
my @data;
|
||||||
|
|
||||||
logmsg "LIST_imap got $args\n";
|
logmsg "LIST_imap got $args\n";
|
||||||
|
|
||||||
|
if ($reference eq '"verifiedserver"') {
|
||||||
|
# this is the secret command that verifies that this actually is
|
||||||
|
# the curl test server
|
||||||
|
@data = ("* LIST () \"/\" \"WE ROOLZ: $$\"\r\n");
|
||||||
|
if($verbose) {
|
||||||
|
print STDERR "FTPD: We returned proof we are the test server\n";
|
||||||
|
}
|
||||||
|
logmsg "return proof we are we\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
my $testno = $reference;
|
my $testno = $reference;
|
||||||
$testno =~ s/^([^0-9]*)//;
|
$testno =~ s/^([^0-9]*)//;
|
||||||
my $testpart = "";
|
my $testpart = "";
|
||||||
@ -953,7 +964,8 @@ sub LIST_imap {
|
|||||||
|
|
||||||
loadtest("$srcdir/data/test$testno");
|
loadtest("$srcdir/data/test$testno");
|
||||||
|
|
||||||
my @data = getpart("reply", "data$testpart");
|
@data = getpart("reply", "data$testpart");
|
||||||
|
}
|
||||||
|
|
||||||
for my $d (@data) {
|
for my $d (@data) {
|
||||||
sendcontrol $d;
|
sendcontrol $d;
|
||||||
|
Loading…
Reference in New Issue
Block a user