Set explicit Message-ID in MultifactorManageForm::sendEmail()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 5 May 2021 12:58:34 +0000 (14:58 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 5 May 2021 13:40:36 +0000 (15:40 +0200)
wcfsetup/install/files/lib/form/MultifactorManageForm.class.php

index 53ff5b8058571fff1e84e03da9aa9e1a3d0583e7..bad8099ed66f241e8d6f042992bd133decbe5466 100644 (file)
@@ -252,6 +252,12 @@ class MultifactorManageForm extends AbstractFormBuilderForm
     {
         $email = new SimpleEmail();
         $email->setRecipient(WCF::getUser());
+        $email->setMessageID(\sprintf(
+            'com.woltlab.wcf.multifactorSetup/%d/%d/%s',
+            WCF::getUser()->userID,
+            TIME_NOW,
+            \bin2hex(\random_bytes(8))
+        ));
 
         $email->setSubject(
             WCF::getLanguage()->getDynamicVariable('wcf.user.security.multifactor.setupEmail.subject', [