From 8be70e0dc1140aac1e1e2170c4c88f60db44217f Mon Sep 17 00:00:00 2001 From: Brayan Pereyra Date: Mon, 15 Sep 2025 13:18:36 +0000 Subject: [PATCH] TASK-208 Add validation for create log file --- workflow/engine/classes/AuthSources.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/workflow/engine/classes/AuthSources.php b/workflow/engine/classes/AuthSources.php index b518f37e1..237dfc542 100644 --- a/workflow/engine/classes/AuthSources.php +++ b/workflow/engine/classes/AuthSources.php @@ -656,12 +656,11 @@ class AuthSources private function log($link, $text) { - $logFile = PATH_DATA . 'logs/ldapAdvanced.log'; + $logFile = PATH_DATA . 'logs/ldap.log'; - // Validate log file exists and is writable if (!file_exists($logFile)) { - error_log('Log file does not exist: ' . $logFile); - throw new Exception('Log file does not exist: ' . $logFile); + file_put_contents($logFile, "Start\n"); + @chmod($logFile, 0644); } if (!is_writable($logFile)) {