commit 61b1225ab4478d694bf6ed91803e1d92c8f97d0f Author: Moshe Weitzman Date: Thu May 3 14:44:29 2018 -0400 Make writable htkey file. diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc index 4d28eaa036..26ca135868 100644 --- a/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -717,8 +717,10 @@ function drupal_generate_test_ua($prefix) { else { // Generate and save a new hash salt for a test run. // Consumed by drupal_valid_test_ua() before settings.php is loaded. + mkdir($key_dir, 0775, true); + chmod($key_dir, 0775); $private_key = Crypt::randomBytesBase64(55); - file_put_contents($key_file, $private_key); + file_put_contents($key_dir . '/.htkey', $private_key); } // The file properties add more entropy not easily accessible to others. $key = $private_key . filectime(__FILE__) . fileinode(__FILE__);