🔒 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()
|
||||
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()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue