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-hvr9-72v2-fff3

Danielf52684d71aca
diff --git a/kernel/model/session.go b/kernel/model/session.go
index f0b411a9c9..dfa778bee1 100644
--- a/kernel/model/session.go
+++ b/kernel/model/session.go
@@ -274,7 +274,7 @@ func CheckAuth(c *gin.Context) {
if !localhost ||
("" != clientIP && !util.IsLocalHostname(clientIP)) ||
("" != host && !util.IsLocalHost(host)) ||
- ("" != origin && !util.IsLocalOrigin(origin) && !strings.HasPrefix(origin, "chrome-extension://")) ||
+ ("" != origin && !util.IsLocalOrigin(origin)) ||
("" != forwardedHost && !util.IsLocalHost(forwardedHost)) {
c.JSON(http.StatusUnauthorized, map[string]any{"code": -1, "msg": "Auth failed: for security reasons, please set [Lock screen password] when using non-127.0.0.1 access\n\n为安全起见,使用非 127.0.0.1 访问时请设置 [锁屏密码]"})
c.Abort()