Set explicit Message-ID in BackupMultifactorMethod::sendAuthenticationEmail()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 5 May 2021 13:00:41 +0000 (15:00 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 5 May 2021 13:40:36 +0000 (15:40 +0200)
wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php

index 6c8d71443bdbd8c227e1927b91630b61fd62e50a..b6948397108a64aa53f6d2bfbe1809e8e4f45a00 100644 (file)
@@ -363,6 +363,12 @@ final class BackupMultifactorMethod implements IMultifactorMethod
 
         $email = new SimpleEmail();
         $email->setRecipient($setup->getUser());
+        $email->setMessageID(\sprintf(
+            'com.woltlab.wcf.multifactor.backup.used/%d/%d/%s',
+            $setup->getUser()->userID,
+            TIME_NOW,
+            \bin2hex(\random_bytes(8))
+        ));
 
         $email->setSubject(
             WCF::getLanguage()->getDynamicVariable(