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