From 478c3a569ee50497f71c3936d5e493090c314538 Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Sat, 11 Jul 2026 13:57:13 -0400 Subject: [PATCH] =?UTF-8?q?v0.0.41=20-=20Fix=20activity=20log=20label=20fo?= =?UTF-8?q?r=20index=20whitelist=20denials=20=E2=80=94=20shows=20'DENIED:i?= =?UTF-8?q?ndex-not-approved'=20instead=20of=20'DENIED:no-match'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.c | 4 ++-- src/server.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 21719b6..b9a4caf 100644 --- a/src/main.c +++ b/src/main.c @@ -503,8 +503,8 @@ int socket_name_random(char *out, size_t out_len); /* Version information (auto-updated by build/version tooling) */ #define NSIGNER_VERSION_MAJOR 0 #define NSIGNER_VERSION_MINOR 0 -#define NSIGNER_VERSION_PATCH 40 -#define NSIGNER_VERSION "v0.0.40" +#define NSIGNER_VERSION_PATCH 41 +#define NSIGNER_VERSION "v0.0.41" /* NSIGNER_HEADERLESS_DECLS_END */ diff --git a/src/server.c b/src/server.c index 9b72e09..29d2dc7 100644 --- a/src/server.c +++ b/src/server.c @@ -1680,7 +1680,7 @@ int server_handle_one(server_ctx_t *ctx, server_activity_cb cb, void *cb_data) { response = strdup("{\"id\":\"null\",\"error\":{\"code\":2002,\"message\":\"index_not_allowed\"}}"); pchk = POLICY_DENY; verdict = "DENIED"; - source_label = "index-whitelist"; + source_label = "index-not-approved"; hard_selector_error = -100; /* sentinel: skip policy_check */ } @@ -1778,6 +1778,9 @@ int server_handle_one(server_ctx_t *ctx, server_activity_cb cb, void *cb_data) { source_label = "session-grant"; } else if (pchk == POLICY_ALLOW) { source_label = "prompt"; + } else if (hard_selector_error == -100) { + /* Index whitelist denial — keep the label set by the whitelist check */ + /* source_label already set to "index-not-approved" above */ } else { source_label = "no-match"; }