mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
ftpserver.pl: Added SELECT check to IMAP FETCH and STORE handlers
This commit is contained in:
parent
49e3d803ab
commit
6a353049ac
@ -829,6 +829,9 @@ sub FETCH_imap {
|
|||||||
$data[0] = $response;
|
$data[0] = $response;
|
||||||
logmsg "return proof we are we\n";
|
logmsg "return proof we are we\n";
|
||||||
}
|
}
|
||||||
|
elsif ($selected eq "") {
|
||||||
|
sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
logmsg "retrieve a mail\n";
|
logmsg "retrieve a mail\n";
|
||||||
|
|
||||||
@ -941,8 +944,13 @@ sub STORE_imap {
|
|||||||
|
|
||||||
logmsg "STORE_imap got $args\n";
|
logmsg "STORE_imap got $args\n";
|
||||||
|
|
||||||
sendcontrol "* $uid FETCH (FLAGS (\\Seen \\Deleted))\r\n";
|
if ($selected eq "") {
|
||||||
sendcontrol "$cmdid OK STORE completed\r\n";
|
sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sendcontrol "* $uid FETCH (FLAGS (\\Seen \\Deleted))\r\n";
|
||||||
|
sendcontrol "$cmdid OK STORE completed\r\n";
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user