Revert "chg: [internal] Install random_compat by Composer"

This reverts commit fe7d0a46
pull/7352/head
Jakub Onderka 2021-04-19 13:17:20 +02:00
parent 658f30b7b1
commit d3b1eb51fb
4 changed files with 15 additions and 1 deletions

4
.gitmodules vendored
View File

@ -7,6 +7,10 @@
[submodule "app/files/warninglists"]
path = app/files/warninglists
url = https://github.com/MISP/misp-warninglists.git
[submodule "app/Lib/random_compat"]
path = app/Lib/random_compat
url = https://github.com/paragonie/random_compat
branch = master
[submodule "app/files/misp-galaxy"]
path = app/files/misp-galaxy
url = https://github.com/MISP/misp-galaxy

View File

@ -2,6 +2,16 @@
class RandomTool
{
public function __construct()
{
// import compatibility library for PHP < 7.0
if (!function_exists('random_int')) {
if (file_exists(APP . 'Lib' . DS . 'random_compat' . DS . 'lib' . DS . 'random.php')) {
require_once(APP . 'Lib' . DS . 'random_compat' . DS . 'lib' . DS . 'random.php');
}
}
}
/**
* Generate a random string
*

1
app/Lib/random_compat Submodule

@ -0,0 +1 @@
Subproject commit 088c04e2f261c33bed6ca5245491cfca69195ccf

View File

@ -10,7 +10,6 @@
"ext-simplexml": "*",
"ext-pcre": "*",
"cakephp/cakephp": "2.10.24",
"paragonie/random_compat": ">=2",
"kamisama/cake-resque": "4.1.2",
"pear/crypt_gpg": "1.6.3",
"monolog/monolog": "1.24.0"