Skip to content

Commit 0fe2d9c

Browse files
committed
Fixed bug preventing AES-256-CBC cipher from working properly
1 parent 6699027 commit 0fe2d9c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Action/Decrypt.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ public function get($name)
2929

3030
if (!empty($this->configkey) && count($configfile)) {
3131

32-
$crypt = new Encrypter($this->configkey);
32+
$encenv_config = ['cipher' => ''];
33+
if (file_exists(config_path('encryptenv.php'))) {
34+
$encenv_config = require(config_path('encryptenv.php'));
35+
}
36+
37+
$crypt = new Encrypter($this->configkey, $encenv_config['cipher']);
3338

3439
return !empty($configfile[$name]) && !is_array($configfile[$name]) && strpos($configfile[$name], "ENC:") === 0 ?
3540
$crypt->decrypt(substr($configfile[$name], 4)) :

0 commit comments

Comments
 (0)