mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🔒 API token 绕过校验漏洞 Fix https://github.com/siyuan-note/siyuan/issues/7507
This commit is contained in:
parent
aa97f0df87
commit
b03dbfcf27
1 changed files with 1 additions and 7 deletions
|
|
@ -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()
|
c.Next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -228,11 +228,5 @@ func CheckAuth(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if u := c.Query("url"); "" != u {
|
|
||||||
c.Redirect(302, u)
|
|
||||||
c.Abort()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
c.Next()
|
c.Next()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue