提交 5eec7c31 编写于 作者: 7 710leo

bugfix: arbitrary file reading

上级 c5ba127b
package http
import (
"path"
"github.com/didi/nightingale/src/modules/monapi/config"
"github.com/gin-gonic/gin"
......@@ -27,7 +29,7 @@ func tplNameGets(c *gin.Context) {
}
func tplGet(c *gin.Context) {
tplName := mustQueryStr(c, "tplName")
tplName := path.Base(mustQueryStr(c, "tplName"))
tplType := mustQueryStr(c, "tplType")
var filePath string
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册