Skip to content

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

:lock: API token 绕过校验漏洞 Fix https://github.com/siyuan-note/siyuan/issues/7507

Liang Dingb03dbfcf27a4
diff --git a/kernel/model/session.go b/kernel/model/session.go
index 5e54ddfb28..53ba90f58e 100644
--- a/kernel/model/session.go
+++ b/kernel/model/session.go
@@ -204,7 +204,7 @@ func CheckAuth(c *gin.Context) {
}
}
- if strings.HasSuffix(c.Request.RequestURI, "/check-auth") {
+ if "/check-auth" == c.Request.URL.Path { // 跳过访问授权页
c.Next()
return
}
@@ -228,11 +228,5 @@ func CheckAuth(c *gin.Context) {
return
}
- if u := c.Query("url"); "" != u {
- c.Redirect(302, u)
- c.Abort()
- return
- }
-
c.Next()
}