Skip to content

Commit

Permalink
Empty strings need to be quoted in IMAP commands (such as SEARCH)
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Nov 19, 2014
1 parent 6543e59 commit 58659dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MailKit/Net/Imap/ImapCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ ImapStringType GetStringType (string value)
{
var type = ImapStringType.Atom;

if (value.Length == 0)
return ImapStringType.QString;

for (int i = 0; i < value.Length; i++) {
if (!IsAtom (value[i])) {
if (!IsQuotedSafe (value[i]))
Expand Down

0 comments on commit 58659dc

Please sign in to comment.