WeKnora/internal
ochan.kwon 8d8cc051be fix(tenant): prevent api_key encryption loss on tenant settings update
When a tenant setting is updated via PUT /tenants/kv/{key} (e.g.,
retrieval-config, parser-engine-config), the GORM AfterFind-decrypted
plaintext api_key was silently written back to the database because
db.Updates() does not trigger the BeforeSave hook.

Guard the repository's UpdateTenant to skip writing plaintext api_key
back to the database. Pre-encrypted values (enc:v1:… from CreateTenant
/ UpdateAPIKey) are written as-is; AfterFind-decrypted plaintext is
blanked so GORM skips the column entirely.

Closes #798
2026-03-25 21:25:21 +08:00
..
agent fix: use service name for MCP tool naming with collision protection (#715) 2026-03-21 10:22:05 +08:00
application fix(tenant): prevent api_key encryption loss on tenant settings update 2026-03-25 21:25:21 +08:00
common feat: add organization management features 2026-02-09 11:40:25 +08:00
config feat(im): add multi-instance support with Redis-based distributed coordination 2026-03-20 15:49:59 +08:00
container feat(im): add AI card streaming for DingTalk and improve IM platform robustness 2026-03-24 22:12:08 +08:00
database feat: enhance system information display with database version 2026-03-02 21:21:49 +08:00
errors feat: Add agent configuration and cleanup scripts for database migrations 2025-11-05 23:18:44 +08:00
event feat: add fallback response handling and UI indicators 2026-03-05 18:14:14 +08:00
handler feat(im): add DingTalk platform integration 2026-03-24 22:12:08 +08:00
im feat(im): add AI card streaming for DingTalk and improve IM platform robustness 2026-03-24 22:12:08 +08:00
infrastructure feat: expose builtin parser engine in settings 2026-03-20 15:52:33 +08:00
logger chore: update fallback templates 2026-03-17 22:23:24 +08:00
mcp fix: MCP Client connection state not marked as closed after connection loss in SSE transport type 2026-02-02 10:42:19 +08:00
middleware refactor: update session title generation and language context handling 2026-03-17 22:23:24 +08:00
models feat(provider): add Novita AI as LLM provider 2026-03-24 22:10:42 +08:00
router feat(knowledge): offload manual processing to async tasks 2026-03-18 21:56:34 +08:00
runtime init commit 2025-08-05 15:08:07 +08:00
sandbox feat: optimize security and deployment of agent skills 2026-02-04 20:08:49 +08:00
searchutil feat: implement parent-child chunking strategy for enhanced context management 2026-03-05 18:14:14 +08:00
stream feat(redis): add REDIS_USERNAME support for Redis ACL 2026-02-04 19:38:40 +08:00
tracing init commit 2025-08-05 15:08:07 +08:00
types feat(provider): add Novita AI as LLM provider 2026-03-24 22:10:42 +08:00
utils fix(tenant): prevent api_key encryption loss on tenant settings update 2026-03-25 21:25:21 +08:00