diff --git a/api/update_ticket.php b/api/update_ticket.php index 3aab4be..88b3af6 100644 --- a/api/update_ticket.php +++ b/api/update_ticket.php @@ -28,7 +28,14 @@ try { foreach ($lines as $line) { if (strpos($line, '=') !== false && strpos($line, '#') !== 0) { list($key, $value) = explode('=', $line, 2); - $envVars[trim($key)] = trim($value); + $key = trim($key); + $value = trim($value); + // Remove surrounding quotes if present + if ((substr($value, 0, 1) === '"' && substr($value, -1) === '"') || + (substr($value, 0, 1) === "'" && substr($value, -1) === "'")) { + $value = substr($value, 1, -1); + } + $envVars[$key] = $value; } } debug_log("Environment variables loaded"); diff --git a/controllers/TicketController.php b/controllers/TicketController.php index 209901b..d3a0f47 100644 --- a/controllers/TicketController.php +++ b/controllers/TicketController.php @@ -20,7 +20,14 @@ class TicketController { foreach ($lines as $line) { if (strpos($line, '=') !== false && strpos($line, '#') !== 0) { list($key, $value) = explode('=', $line, 2); - $this->envVars[trim($key)] = trim($value); + $key = trim($key); + $value = trim($value); + // Remove surrounding quotes if present + if ((substr($value, 0, 1) === '"' && substr($value, -1) === '"') || + (substr($value, 0, 1) === "'" && substr($value, -1) === "'")) { + $value = substr($value, 1, -1); + } + $this->envVars[$key] = $value; } } } diff --git a/views/DashboardView.php b/views/DashboardView.php index 675d978..e91c72d 100644 --- a/views/DashboardView.php +++ b/views/DashboardView.php @@ -29,12 +29,14 @@