fix: harden assistant authoring and UI

This commit is contained in:
ajnart committed 2026-08-14 11:32:10 +02:00
1 parent 3cef3cbdbd
commit d80e883479
45 files changed
+3848 -895

No files matched your search

@@ -0,0 +1,11 @@
export const getSafeAssistantHttpUrl = (source: unknown) => {
if (typeof source !== "string" || !source) return null;
try {
const url = new URL(source);
if ((url.protocol !== "http:" && url.protocol !== "https:") || url.username || url.password) return null;
return url.toString();
} catch {
return null;
}
};