summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Åkre Solberg <andreas.solberg@uninett.no>2009-09-25 09:54:23 +0000
committerAndreas Åkre Solberg <andreas.solberg@uninett.no>2009-09-25 09:54:23 +0000
commit9e37d88d69ebfa31224fe066f501cd3e23343b8f (patch)
tree26f6c7295e2b3007fbc390efa7b7b14890e27361
parent9cedd1a5e58fed68161755d14fad6544373ab2f1 (diff)
downloadsimplesamlphp-9e37d88d69ebfa31224fe066f501cd3e23343b8f.zip
simplesamlphp-9e37d88d69ebfa31224fe066f501cd3e23343b8f.tar.gz
simplesamlphp-9e37d88d69ebfa31224fe066f501cd3e23343b8f.tar.bz2
Fix for random byte generation in MIME email messages
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1789 44740490-163a-0410-bde0-09ae8108e29a
-rw-r--r--lib/SimpleSAML/XHTML/EMail.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/SimpleSAML/XHTML/EMail.php b/lib/SimpleSAML/XHTML/EMail.php
index 19b97a0..4c5385e 100644
--- a/lib/SimpleSAML/XHTML/EMail.php
+++ b/lib/SimpleSAML/XHTML/EMail.php
@@ -66,7 +66,7 @@ pre {
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.');
- $random_hash = substr(0, 16, md5(date('r', time())));
+ $random_hash = SimpleSAML_Utilities::stringToHex(SimpleSAML_Utilities::generateRandomBytes(16));
if (isset($this->from))
$this->headers[]= 'From: ' . $this->from;