Also add some entropy from the container folders.
authorPlatonides <platonides@gmail.com>
Mon, 2 Apr 2012 18:21:02 +0000 (20:21 +0200)
committerPlatonides <platonides@gmail.com>
Mon, 2 Apr 2012 18:21:02 +0000 (20:21 +0200)
Change-Id: I6e1ba061341b7741ade17abfdd46734e38f8f475

includes/CryptRand.php

index e4be1b3..8994082 100644 (file)
@@ -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' ) ) {