Skip to content

Commit

Permalink
fixed important typo that lead to incorrect logic
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksander Piskun <[email protected]>
  • Loading branch information
oleksandr-nc authored and backportbot[bot] committed Nov 20, 2024
1 parent 57ace18 commit d71d5eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/DaemonConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public function updateDaemonConfig(string $name, array $daemonConfigParams): Res
$daemonConfig = $this->daemonConfigService->getDaemonConfigByName($name);

// Safely check if "haproxy_password" exists before accessing it
$haproxyPassword = $daemonConfigParams['deployConfig']['haproxy_password'] ?? null;
$haproxyPassword = $daemonConfigParams['deploy_config']['haproxy_password'] ?? null;

// Restore the original password if "dummySecret123" is provided
if ($haproxyPassword === 'dummySecret123') {
$daemonConfigParams['deployConfig']['haproxy_password'] = $daemonConfig->getDeployConfig()['haproxy_password'] ?? "";
$daemonConfigParams['deploy_config']['haproxy_password'] = $daemonConfig->getDeployConfig()['haproxy_password'] ?? "";
}

// Create and update DaemonConfig instance
Expand Down

0 comments on commit d71d5eb

Please sign in to comment.