From 2ae437160600efe1b262064b33e39f73360c9410 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 13 Jun 2019 03:22:15 +0000 Subject: [PATCH] Sanitize the date for mails --- src/Model/Mail.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Model/Mail.php b/src/Model/Mail.php index 30191edae6..9f3682573e 100644 --- a/src/Model/Mail.php +++ b/src/Model/Mail.php @@ -46,6 +46,8 @@ class Mail $msg['guid'] = Item::guidFromUri($msg['uri'], $host); } + $msg['created'] = (isset($msg['created']) ? DateTimeFormat::utc($msg['created']) : DateTimeFormat::utcNow()); + DBA::lock('mail'); if (DBA::exists('mail', ['uri' => $msg['uri'], 'uid' => $msg['uid']])) {