mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 11:58:49 +01:00
🎨 内核 API 校验 ID 格式 Fix https://github.com/siyuan-note/siyuan/issues/7228
This commit is contained in:
parent
b321185248
commit
f37678a98b
8 changed files with 98 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ func getBlockAttrs(c *gin.Context) {
|
|||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
if util.InvalidIDPattern(id, ret) {
|
||||
return
|
||||
}
|
||||
|
||||
ret.Data = model.GetBlockAttrs(id)
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +60,10 @@ func setBlockAttrs(c *gin.Context) {
|
|||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
if util.InvalidIDPattern(id, ret) {
|
||||
return
|
||||
}
|
||||
|
||||
attrs := arg["attrs"].(map[string]interface{})
|
||||
if 1 == len(attrs) && "" != attrs["scroll"] {
|
||||
// 不记录用户指南滚动位置
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue