- Ya
- 19 Julai 2026, 01:45 UTC
- Mwandishi
- Kamo
- Ahadi ya
- a3625c3
salesAgentId was persisted from the request body unchecked, so a cross-org or dangling agent id could be stored on a WebChatIntegration. It failed safe only because AIService reads the agent back with an org-scoped lookup - the data was wrong, and the blast radius happened to be contained by a check in a different service. That is a fragile place to leave an authorization boundary, so it is now enforced at the write: an id this org does not own is rejected outright. Also widens bootstrap cache invalidation from {designConfig, enabled} to every field the widget bootstrap actually serves (aiEnabled, humanEnabled, salesAgentId, assignmentMode, name). The cache is an unimplemented no-op today so the narrow list was harmless, but it would have become a silent staleness bug the moment the cache was populated - a widget serving the previous agent or routing mode, with no obvious cause.