mirror of
https://github.com/moparisthebest/curl
synced 2025-03-01 01:41:50 -05:00
imap: Fixed escaping of mailbox names
Used imap_atom() to escape mailbox names in imap_select().
This commit is contained in:
parent
fcf02cbb75
commit
4cfc7f951c
10
lib/imap.c
10
lib/imap.c
@ -1089,9 +1089,15 @@ static CURLcode imap_select(struct connectdata *conn)
|
||||
CURLcode result = CURLE_OK;
|
||||
struct SessionHandle *data = conn->data;
|
||||
struct IMAP *imap = data->state.proto.imap;
|
||||
char *mailbox;
|
||||
|
||||
result = imap_sendf(conn, "SELECT %s",
|
||||
imap->mailbox ? imap->mailbox : "");
|
||||
mailbox = imap_atom(imap->mailbox ? imap->mailbox : "");
|
||||
if(!mailbox)
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
else
|
||||
result = imap_sendf(conn, "SELECT %s", mailbox);
|
||||
|
||||
Curl_safefree(mailbox);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user