Merge pull request #7260 from annando/sanitize-input

Sanitize the date for mails
This commit is contained in:
Philipp 2019-06-13 09:11:41 +02:00 committed by GitHub
commit 6c6e3058f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ class Mail
$msg['guid'] = Item::guidFromUri($msg['uri'], $host);
}
$msg['created'] = (!empty($msg['created']) ? DateTimeFormat::utc($msg['created']) : DateTimeFormat::utcNow());
DBA::lock('mail');
if (DBA::exists('mail', ['uri' => $msg['uri'], 'uid' => $msg['uid']])) {