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:
parent
d7bd50b5a5
commit
44d37892b8
1 changed files with 4 additions and 0 deletions
|
@ -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) }
|
||||
|
|
Loading…
Reference in a new issue