mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🔒 Some security vulnerabilities https://github.com/siyuan-note/siyuan/issues/13426
This commit is contained in:
parent
2b5a9f9f1a
commit
e70ed57f6e
5 changed files with 28 additions and 1 deletions
|
|
@ -31,6 +31,12 @@ import (
|
|||
|
||||
func BuiltInTemplateFuncs() (ret template.FuncMap) {
|
||||
ret = sprig.TxtFuncMap()
|
||||
|
||||
// 因为安全原因移除一些函数 https://github.com/siyuan-note/siyuan/issues/13426
|
||||
delete(ret, "env")
|
||||
delete(ret, "expandenv")
|
||||
delete(ret, "getHostByName")
|
||||
|
||||
ret["Weekday"] = util.Weekday
|
||||
ret["WeekdayCN"] = util.WeekdayCN
|
||||
ret["WeekdayCN2"] = util.WeekdayCN2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue