mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:04:39 +03:00
Don't allow mailboxes named "." or ".." and normalize names during imports too
It only serves to confuse. When exporting such mailboxes in zip files or tar files, extracting will cause trouble.
This commit is contained in:
@ -433,10 +433,10 @@ func importMessages(ctx context.Context, log mlog.Log, token string, acc *store.
|
||||
}
|
||||
|
||||
xensureMailbox := func(name string) *store.Mailbox {
|
||||
// Ensure name is normalized.
|
||||
name = norm.NFC.String(name)
|
||||
if strings.ToLower(name) == "inbox" {
|
||||
name = "Inbox"
|
||||
}
|
||||
name, _, err := store.CheckMailboxName(name, true)
|
||||
ximportcheckf(err, "checking mailbox name")
|
||||
|
||||
if mb, ok := mailboxNames[name]; ok {
|
||||
return mb
|
||||
|
Reference in New Issue
Block a user