From b48d9bf5d412a6f56f3f9ba4bad141ddfe175727 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 07 Sep 2009 08:51:21 -0400
Subject: [PATCH] - Use faster/secure mt_rand() (#1486094)

---
 program/steps/mail/func.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 87f7bc4..ed36e84 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -676,7 +676,7 @@
     '/(<\/nobr>)(\s+)(<nobr>)/i',	// space(s) between <NOBR>
     '/<title>.*<\/title>/i',		// PHP bug #32547 workaround: remove title tag
     '/^(\0\0\xFE\xFF|\xFF\xFE\0\0|\xFE\xFF|\xFF\xFE|\xEF\xBB\xBF)/',	// byte-order mark (only outlook?)
-    '/<html\sxmlns:[a-z]=[^>]+>/i',  // washtml/DOMDocument cannot handle xml namespaces
+    '/<html\s[^>]+>/i',			// washtml/DOMDocument cannot handle xml namespaces
   );
   $html_replace = array(
     '\\1'.' &nbsp; '.'\\3',
@@ -1425,7 +1425,7 @@
       'From' => $sender,
       'To'   => $message->headers->mdn_to,
       'Subject' => rcube_label('receiptread') . ': ' . $message->subject,
-      'Message-ID' => sprintf('<%s@%s>', md5(uniqid('rcmail'.rand(),true)), $RCMAIL->config->mail_domain($_SESSION['imap_host'])),
+      'Message-ID' => sprintf('<%s@%s>', md5(uniqid('rcmail'.mt_rand(),true)), $RCMAIL->config->mail_domain($_SESSION['imap_host'])),
       'X-Sender' => $identity['email'],
       'Content-Type' => 'multipart/report; report-type=disposition-notification',
     );

--
Gitblit v1.9.1