Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:lock: https://github.com/siyuan-note/siyuan/security/advisories/GHSA-73g7-86qr-jrg3

Danielf09953afc57a
diff --git a/kernel/util/misc.go b/kernel/util/misc.go
index 893689b2bb..f0b1c9e31d 100644
--- a/kernel/util/misc.go
+++ b/kernel/util/misc.go
@@ -238,6 +238,9 @@ func SanitizeSVG(svgInput string) string {
next := c.NextSibling
if c.Type == html.ElementNode {
tag := strings.ToLower(c.Data)
+ if i := strings.LastIndex(tag, ":"); i >= 0 {
+ tag = tag[i+1:]
+ }
if tag == "script" || tag == "iframe" || tag == "object" || tag == "embed" || tag == "foreignobject" || "animate" == tag ||
"animatetransform" == tag || "animatecolor" == tag || "animatemotion" == tag || "set" == tag {
n.RemoveChild(c)