mirror of https://github.com/MISP/MISP
chg: [internal] Do not use uniqid() and openssl_random_pseudo_bytes() methods
parent
0b0aa0fa1e
commit
781de7dd6a
|
@ -114,7 +114,7 @@ class CakeEmailExtended extends CakeEmail
|
|||
throw new InvalidArgumentException("Expected instance of CakeEmailBody, " . gettype($this->body) . " given.");
|
||||
}
|
||||
|
||||
$this->_boundary = md5(uniqid());
|
||||
$this->_boundary = md5(mt_rand());
|
||||
|
||||
$rendered = [];
|
||||
if (!empty($this->body->text)) {
|
||||
|
@ -191,7 +191,7 @@ class MimeMultipart
|
|||
public function __construct($subtype = 'mixed', $additionalTypes = array())
|
||||
{
|
||||
$this->subtype = $subtype;
|
||||
$this->boundary = md5(uniqid());
|
||||
$this->boundary = md5(mt_rand());
|
||||
$this->additionalTypes = $additionalTypes;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* - data_path: The path to the data used to display as the text representation of the link
|
||||
* - payload_paths: Payloads to encode as form values - key value list with the key being the field name and value being in the typical dot notation extraction path
|
||||
*/
|
||||
$randomId = bin2hex(openssl_random_pseudo_bytes(8));
|
||||
$randomId = dechex(mt_rand());
|
||||
$fieldsArray = [];
|
||||
if (!empty($field['payload_paths'])) {
|
||||
foreach ($field['payload_paths'] as $fieldName => $path) {
|
||||
|
@ -54,7 +54,7 @@
|
|||
);
|
||||
}
|
||||
echo sprintf(
|
||||
'%s<a href="#" onClick="event.preventDefault(); %s">%s</a>',
|
||||
'%s<a href="#" onclick="event.preventDefault(); %s">%s</a>',
|
||||
$form,
|
||||
$onclick,
|
||||
$text
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
$randomId = bin2hex(openssl_random_pseudo_bytes(8));
|
||||
$randomId = dechex(mt_rand());
|
||||
echo sprintf(
|
||||
'<div id="%s" %s>',
|
||||
empty($scaffold_data['containerId']) ? ('index_container_' . $randomId . '_content') : $scaffold_data['containerId'] . '_content',
|
||||
|
@ -10,4 +10,4 @@
|
|||
if (empty($ajax)) {
|
||||
echo $this->element('/genericElements/SideMenu/side_menu', $menuData);
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* create single view child index
|
||||
*
|
||||
*/
|
||||
$randomId = bin2hex(openssl_random_pseudo_bytes(8));
|
||||
if (!empty($child['url_params'])) {
|
||||
if (!is_array($child['url_params'])) {
|
||||
$child['url_params'] = [$child['url_params']];
|
||||
|
|
Loading…
Reference in New Issue