fix(webui): harden automation management API
Maintainer edit: redact external channel chat identifiers from the WebUI automation payload and reject malformed or unschedulable automation updates before they mutate cron jobs.
This commit is contained in:
@@ -3583,7 +3583,7 @@ function AutomationRow({
|
||||
t(key, { defaultValue: fallback, ...(values ?? {}) });
|
||||
const status = automationStatus(job, tx);
|
||||
const origin = automationOriginLabel(job, tx);
|
||||
const originHref = job.origin?.channel === "websocket"
|
||||
const originHref = job.origin?.channel === "websocket" && job.origin.session_key
|
||||
? `#/chat/${encodeURIComponent(job.origin.session_key)}`
|
||||
: null;
|
||||
const history = job.state.run_history ?? [];
|
||||
@@ -4257,7 +4257,7 @@ function automationOriginLabel(
|
||||
}
|
||||
if (!origin) return tx("settings.automations.origin.unknown", "No linked chat");
|
||||
if (origin.channel !== "websocket") return automationChannelLabel(origin.channel, tx);
|
||||
return origin.title || origin.preview || origin.session_key;
|
||||
return origin.title || origin.preview || origin.session_key || automationChannelLabel(origin.channel, tx);
|
||||
}
|
||||
|
||||
function automationChannelLabel(
|
||||
|
||||
Reference in New Issue
Block a user