harden avatar URL validation to block root-relative paths
This commit is contained in:
parent
c99ead8a87
commit
7690395efe
@ -194,7 +194,7 @@ export function normalizeAgentLabel(agent: {
|
||||
return agent.name?.trim() || agent.identity?.name?.trim() || agent.id;
|
||||
}
|
||||
|
||||
const AVATAR_URL_RE = /^(https?:\/\/|data:image\/|\/)/i;
|
||||
const AVATAR_URL_RE = /^(https?:\/\/|data:image\/|blob:)/i;
|
||||
|
||||
export function resolveAgentAvatarUrl(
|
||||
agent: { identity?: { avatar?: string; avatarUrl?: string } },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user