Lint in CI

This commit is contained in:
Neil Alexander
2025-12-20 14:06:14 +00:00
parent 0fe5375737
commit fa32249f2f
10 changed files with 52 additions and 27 deletions

View File

@@ -31,7 +31,7 @@ func (b *Backend) Login(conn *imap.ConnInfo, username, password string) (backend
// If our username is email-like, then take just the localpart
if pk, err := utils.ParseAddress(username); err == nil {
if !pk.Equal(b.Config.PublicKey) {
b.Log.Println("Failed to authenticate IMAP user due to wrong domain", pk, b.Config.PublicKey)
b.Log.Println("Failed to authenticate IMAP user due to wrong domain", hex.EncodeToString(pk), hex.EncodeToString(b.Config.PublicKey))
return nil, fmt.Errorf("failed to authenticate: wrong domain in username")
}
}

View File

@@ -327,7 +327,9 @@ func (mbox *Mailbox) MoveMessages(uid bool, seqset *imap.SeqSet, dest string) er
return err
}
if mbox.name == "Outbox" {
mbox.backend.Storage.QueueDeleteDestinationForID("Outbox", int(id))
if err := mbox.backend.Storage.QueueDeleteDestinationForID("Outbox", int(id)); err != nil {
return err
}
}
}
return nil