diff options
author | x-xiang <x.xiang@outlook.com> | 2017-03-08 11:43:14 +0800 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2017-03-27 19:02:39 +0200 |
commit | e9e860a05be187862a0213f8c6c58aff2293bb22 (patch) | |
tree | 51df14a18c762cc0795d62145bffdd56aad9cf5d | |
parent | 727b21c839a2b7e85ba432d77d6072023c76077b (diff) | |
download | php-git-e9e860a05be187862a0213f8c6c58aff2293bb22.tar.gz |
Don't retain mt_rand() seeds across requests
In particular, this prevents manual seeding of mt_rand() to leak
across requests.
-rw-r--r-- | ext/standard/basic_functions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index aaf4301d64..4784a216e1 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -3810,6 +3810,8 @@ PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */ zend_hash_destroy(&BG(putenv_ht)); #endif + BG(mt_rand_is_seeded) = 0; + if (BG(umask) != -1) { umask(BG(umask)); } |