Skip to content
Snippets Groups Projects
Commit 9e37d88d authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Fix for random byte generation in MIME email messages

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1789 44740490-163a-0410-bde0-09ae8108e29a
parent 9cedd1a5
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ pre { ...@@ -66,7 +66,7 @@ pre {
if ($this->subject == NULL) throw new Exception('EMail field [subject] is required and not set.'); if ($this->subject == NULL) throw new Exception('EMail field [subject] is required and not set.');
if ($this->body == NULL) throw new Exception('EMail field [body] is required and not set.'); if ($this->body == NULL) throw new Exception('EMail field [body] is required and not set.');
$random_hash = substr(0, 16, md5(date('r', time()))); $random_hash = SimpleSAML_Utilities::stringToHex(SimpleSAML_Utilities::generateRandomBytes(16));
if (isset($this->from)) if (isset($this->from))
$this->headers[]= 'From: ' . $this->from; $this->headers[]= 'From: ' . $this->from;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment