mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 08:18:16 +03:00
imapserver: When trying to replace a message in a non-existent mailbox, do still consume the message if it is a non-synchronized literal
Not likely to happen in the wild.
This commit is contained in:
parent
5294a63c26
commit
9ca50ab207
@ -77,7 +77,7 @@ func (c *conn) cmdxReplace(isUID bool, tag, cmd string, p *parser) {
|
|||||||
return func() { xserverErrorf("finding mailbox: %v", err) }
|
return func() { xserverErrorf("finding mailbox: %v", err) }
|
||||||
}
|
}
|
||||||
if mb == nil {
|
if mb == nil {
|
||||||
xusercodeErrorf("TRYCREATE", "%w", store.ErrUnknownMailbox)
|
return func() { xusercodeErrorf("TRYCREATE", "%w", store.ErrUnknownMailbox) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Resolve "*" for UID or message sequence.
|
// Resolve "*" for UID or message sequence.
|
||||||
|
@ -58,6 +58,9 @@ func TestReplace(t *testing.T) {
|
|||||||
)
|
)
|
||||||
tc.xcodeArg(imapclient.CodeHighestModSeq(9))
|
tc.xcodeArg(imapclient.CodeHighestModSeq(9))
|
||||||
|
|
||||||
|
// Non-existent mailbox with non-synchronizing literal should consume the literal.
|
||||||
|
tc.transactf("no", "replace 1 bogusbox {1+}\r\nx")
|
||||||
|
|
||||||
// Leftover data.
|
// Leftover data.
|
||||||
tc.transactf("bad", "replace 1 inbox () {6+}\r\ntest\r\n ")
|
tc.transactf("bad", "replace 1 inbox () {6+}\r\ntest\r\n ")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user