From c136f004e9bbb32fc5e211a940e188ba541da2ed Mon Sep 17 00:00:00 2001 From: lgromero Date: Tue, 1 Oct 2024 15:47:12 +0200 Subject: [PATCH] refs #799 adds apparmor exception to write in kea conf and delete hash in controller --- src/DhcpBundle/Controller/DhcpController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DhcpBundle/Controller/DhcpController.php b/src/DhcpBundle/Controller/DhcpController.php index 97174c6..2495450 100644 --- a/src/DhcpBundle/Controller/DhcpController.php +++ b/src/DhcpBundle/Controller/DhcpController.php @@ -286,6 +286,10 @@ class DhcpController return new JsonResponse(['error' => $responseError], 400); } else { $response[0]['arguments']['Dhcp4']['subnet4'][] = $newSubnet; + // Eliminar el campo 'hash' si existe + if (isset($response[0]['arguments']['hash'])) { + unset($response[0]['arguments']['hash']); + } $array_encoded = json_encode($response[0]['arguments']); $configurationParsed = str_replace('\\', '', $array_encoded); $configuration = json_decode($configurationParsed);