forked from Wavyzz/dolibarr
replace random_bytes
This commit is contained in:
@@ -92,7 +92,7 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M
|
||||
*/
|
||||
public function __construct(Swift_Mime_SimpleHeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_IdGenerator $idGenerator)
|
||||
{
|
||||
$this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values
|
||||
$this->cacheKey = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true));
|
||||
$this->cache = $cache;
|
||||
$this->headers = $headers;
|
||||
$this->idGenerator = $idGenerator;
|
||||
@@ -420,7 +420,7 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M
|
||||
public function getBoundary()
|
||||
{
|
||||
if (!isset($this->boundary)) {
|
||||
$this->boundary = '_=_swift_'.time().'_'.bin2hex(random_bytes(16)).'_=_';
|
||||
$this->boundary = '_=_swift_'.time().'_'.md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true)).'_=_';
|
||||
}
|
||||
|
||||
return $this->boundary;
|
||||
@@ -813,7 +813,7 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M
|
||||
{
|
||||
$this->headers = clone $this->headers;
|
||||
$this->encoder = clone $this->encoder;
|
||||
$this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values
|
||||
$this->cacheKey = md5(getmypid().'.'.time().'.'.uniqid(mt_rand(), true));
|
||||
$children = array();
|
||||
foreach ($this->children as $pos => $child) {
|
||||
$children[$pos] = clone $child;
|
||||
|
||||
Reference in New Issue
Block a user