fix issue 240: Arbitrary File Deletion vulnerability in task API'
This commit is contained in:
parent
9ab37a3b87
commit
2618bd4bc9
@ -198,7 +198,7 @@ func UpdateTask(c *gin.Context) {
|
||||
// 删除任务
|
||||
func DeleteTask(c *gin.Context) {
|
||||
fullName := c.DefaultQuery("full_name", "")
|
||||
if fullName == "" {
|
||||
if fullName == "" || Strings.Contains(fullName, "/") {
|
||||
app.Error(c, -1, errors.New("参数不正确,请确定参数full_name是否传递"), "")
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user