fix(actions): validate workflow param to prevent 500 error (#37546)
Fix #37523
This commit is contained in:
committed by
GitHub
parent
6ba907d89c
commit
ee803ad05d
@@ -1072,7 +1072,7 @@ func EnableWorkflowFile(ctx *context_module.Context) {
|
|||||||
func disableOrEnableWorkflowFile(ctx *context_module.Context, isEnable bool) {
|
func disableOrEnableWorkflowFile(ctx *context_module.Context, isEnable bool) {
|
||||||
workflow := ctx.FormString("workflow")
|
workflow := ctx.FormString("workflow")
|
||||||
if len(workflow) == 0 {
|
if len(workflow) == 0 {
|
||||||
ctx.ServerError("workflow", nil)
|
ctx.JSONError("workflow is required")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user