File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Yii Framework 2 HTTP client extension Change Log
55------------------------
66
77- Enh #215 : Added possibility to skip charset in header on ` UrlEncodedFormatter::format() ` (egorrishe)
8-
8+ - Enh # 216 : Use ` random_int() ` when generating boundary (samdark)
99
10102.0.13 December 23, 2020
1111------------------------
Original file line number Diff line number Diff line change 1818 }
1919 ],
2020 "require" : {
21- "yiisoft/yii2" : " ~2.0.13"
21+ "yiisoft/yii2" : " ~2.0.13" ,
22+ "paragonie/random_compat" : " >=1"
2223 },
2324 "require-dev" : {
2425 "cweagans/composer-patches" : " ^1.7" ,
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class Request extends Message
6161 * @var array Stores map (alias => name) of the content parameters
6262 */
6363 private $ _contentMap = [];
64- /**
64+ /**
6565 * @var float stores the starttime of the current request with microsecond-precession
6666 */
6767 private $ _startTime ;
@@ -383,7 +383,8 @@ private function prepareMultiPartContent(array $content)
383383
384384 // generate safe boundary :
385385 do {
386- $ boundary = '--------------------- ' . md5 (mt_rand () . microtime ());
386+
387+ $ boundary = '--------------------- ' . md5 (random_int (0 , PHP_INT_MAX ) . microtime ());
387388 } while (preg_grep ("/ {$ boundary }/ " , $ contentParts ));
388389
389390 // add boundary for each part :
You can’t perform that action at this time.
0 commit comments