1
1
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-04-21 21:40:01 +03:00

imapserver: REPLACE commands when in read-only mode should fail

This commit is contained in:
Mechiel Lukkien 2025-02-26 18:39:41 +01:00
parent d7bd50b5a5
commit 44d37892b8
No known key found for this signature in database

View file

@ -69,6 +69,10 @@ func (c *conn) cmdxReplace(isUID bool, tag, cmd string, p *parser) {
// function aborts handling this command.
var uidOld store.UID
checkMessage := func(tx *bstore.Tx) func() {
if c.readonly {
return func() { xuserErrorf("mailbox open in read-only mode") }
}
mb, err := c.account.MailboxFind(tx, name)
if err != nil {
return func() { xserverErrorf("finding mailbox: %v", err) }