mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed excessive security.yaml file creation [#3432]
This commit is contained in:
parent
350134b256
commit
4568a197e7
|
|
@ -11,6 +11,7 @@
|
|||
3. [](#bugfix)
|
||||
* Fixed escaping in PageIndex::getLevelListing()
|
||||
* Fixed validation of `number` type [#3433](https://github.com/getgrav/grav/issues/3433)
|
||||
* Fixed excessive `security.yaml` file creation [#3432](https://github.com/getgrav/grav/issues/3432)
|
||||
|
||||
# v1.7.20
|
||||
## 09/01/2021
|
||||
|
|
|
|||
|
|
@ -400,8 +400,12 @@ class Setup extends Data
|
|||
$this->initializeLocator($locator);
|
||||
}
|
||||
|
||||
// Create security.yaml if it doesn't exist.
|
||||
$filename = $locator->findResource(static::$securityFile, true, true);
|
||||
// Create security.yaml salt if it doesn't exist into existing configuration environment if possible.
|
||||
$securityFile = basename(static::$securityFile);
|
||||
$securityFolder = substr(static::$securityFile, 0, -\strlen($securityFile));
|
||||
$securityFolder = $locator->findResource($securityFolder, true) ?: $locator->findResource($securityFolder, true, true);
|
||||
$filename = " {$securityFolder}/{$securityFile}";
|
||||
|
||||
$security_file = CompiledYamlFile::instance($filename);
|
||||
$security_content = (array)$security_file->content();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user