1
0

Replace token generation with hash and uniqid with secure random numbers from random_bytes

This commit is contained in:
Hanno Böck
2021-02-01 10:57:42 +01:00
committed by onli
parent 80be37ca8d
commit 931e621549
4 changed files with 5 additions and 5 deletions

@ -530,7 +530,7 @@ function serendipity_sendMail($to, $subject, $message, $fromMail, $headers = NUL
$maildata['headers'][] = 'X-Mailer: ' . $maildata['version'];
$maildata['headers'][] = 'X-Engine: PHP/'. phpversion();
}
$maildata['headers'][] = 'Message-ID: <'. md5(microtime() . uniqid(time())) .'@'. $_SERVER['HTTP_HOST'] .'>';
$maildata['headers'][] = 'Message-ID: <'. bin2hex(random_bytes(16)) .'@'. $_SERVER['HTTP_HOST'] .'>';
$maildata['headers'][] = 'MIME-Version: 1.0';
$maildata['headers'][] = 'Precedence: bulk';
$maildata['headers'][] = 'Content-Type: text/plain; charset=' . LANG_CHARSET;