From c9a5239117f1dbf9215ff01f449466dc1ca4d13f Mon Sep 17 00:00:00 2001 From: Jabber Developer Date: Thu, 30 Apr 2026 19:05:33 +0000 Subject: [PATCH] fix(ai): remove API key from debug log Remove the log_debug line in ai_client.c that leaked the first 10 characters of the API key into logs. This is also contained a memory leak (g_strndup return value was never freed). --- src/ai/ai_client.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ai/ai_client.c b/src/ai/ai_client.c index 36fcfc33..393f7083 100644 --- a/src/ai/ai_client.c +++ b/src/ai/ai_client.c @@ -717,7 +717,6 @@ _ai_request_thread(gpointer data) log_debug("[AI-THREAD] API URL: %s", api_url); log_debug("[AI-THREAD] API Request URL: %s", request_url); log_debug("[AI-THREAD] Model: %s", session->model); - log_debug("[AI-THREAD] API Key: %s", session->api_key ? (strlen(session->api_key) > 10 ? g_strndup(session->api_key, 10) : session->api_key) : "NULL"); curl_easy_setopt(curl, CURLOPT_URL, request_url); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, json_payload);