From a94add3fe82cd9462638d9f6cdef412e4ea10e0b Mon Sep 17 00:00:00 2001 From: Platonides Date: Mon, 2 Apr 2012 20:21:02 +0200 Subject: [PATCH] Also add some entropy from the container folders. Change-Id: I6e1ba061341b7741ade17abfdd46734e38f8f475 --- includes/CryptRand.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/CryptRand.php b/includes/CryptRand.php index e4be1b3788..89940822ba 100644 --- a/includes/CryptRand.php +++ b/includes/CryptRand.php @@ -63,8 +63,14 @@ class MWCryptRand { // Include some information about the filesystem's current state in the random state $files = array(); + // We know this file is here so grab some info about ourself $files[] = __FILE__; + + // We must also have a parent folder, and with the usual file structure, a grandparent + $files[] = dirname( __FILE__ ); + $files[] = dirname( dirname( __FILE__ ) ); + // The config file is likely the most often edited file we know should be around // so if the constant with it's location is defined include it's stat info into the state if ( defined( 'MW_CONFIG_FILE' ) ) { -- 2.20.1