Skip to content

Commit e9e860a

Browse files
x-xiangnikic
authored andcommitted
Don't retain mt_rand() seeds across requests
In particular, this prevents manual seeding of mt_rand() to leak across requests.
1 parent 727b21c commit e9e860a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/standard/basic_functions.c

+2
Original file line numberDiff line numberDiff line change
@@ -3810,6 +3810,8 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
38103810
zend_hash_destroy(&BG(putenv_ht));
38113811
#endif
38123812

3813+
BG(mt_rand_is_seeded) = 0;
3814+
38133815
if (BG(umask) != -1) {
38143816
umask(BG(umask));
38153817
}

0 commit comments

Comments
 (0)