KamoCRM

Reject cross-org sales agents; widen bootstrap cache busting

FixMediaService
Shipped
19 ஜூலை, 2026 அன்று 1:45 AM UTC
Author
Kamo
Commit
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.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing