Browse Source

imap: fix untrimmed query str resulting in invalid search criteria in cyrus

jmap-eventsource
Manos Pitsidianakis 1 year ago
parent
commit
2ef2add67f
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 2
      melib/src/backends/imap.rs

2
melib/src/backends/imap.rs

@ -1179,7 +1179,7 @@ impl MailBackend for ImapType {
let mut conn = connection.lock().await;
conn.examine_mailbox(mailbox_hash, &mut response, false)
.await?;
conn.send_command(format!("UID SEARCH CHARSET UTF-8 {}", query_str).as_bytes())
conn.send_command(format!("UID SEARCH CHARSET UTF-8 {}", query_str.trim()).as_bytes())
.await?;
conn.read_response(&mut response, RequiredResponses::SEARCH)
.await?;

Loading…
Cancel
Save