From 50f22ccf253e560181bf4534fbd283682c010d0d Mon Sep 17 00:00:00 2001 From: FreeScout Date: Thu, 3 Dec 2020 02:24:43 -0800 Subject: [PATCH] Allow encoded settings using env_encode parameter --- app/Http/Controllers/SettingsController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 5b8a3d0c..635b5e7a 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -276,6 +276,10 @@ class SettingsController extends Controller if (!empty($settings_params[$option_name]) && !empty($settings_params[$option_name]['env'])) { $env_value = $request->settings[$option_name] ?? ''; + if (!empty($settings_params[$option_name]['env_encode'])) { + $env_value = base64_encode($env_value); + } + \Helper::setEnvFileVar($settings_params[$option_name]['env'], $env_value); config($option_name, $env_value);