mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 13:16:53 +00:00
fix(GODT-2638): Validate messages before import.
Ensure messages have required header fields and adhere to the rfc5322 spec before import.
This commit is contained in:
@ -446,6 +446,13 @@ func (s *scenario) imapClientAppendsTheFollowingMessagesToMailbox(clientID strin
|
||||
return err
|
||||
}
|
||||
|
||||
for idx, message := range messages {
|
||||
if len(message.Date) == 0 {
|
||||
logrus.Warnf("Appended message has no date, adding default one so it does not fail test")
|
||||
}
|
||||
messages[idx].Date = "23 Feb 80 00:00 GMT"
|
||||
}
|
||||
|
||||
for _, message := range messages {
|
||||
if err := clientAppend(client, mailbox, string(message.Build())); err != nil {
|
||||
s.t.pushError(err)
|
||||
|
||||
Reference in New Issue
Block a user