fix: add sorting range validation, reject out-of-range int8 values with 400
This commit is contained in:
@@ -574,6 +574,10 @@ func EditProjectColumn(ctx *context.APIContext) {
|
||||
column.Color = *form.Color
|
||||
}
|
||||
if form.Sorting != nil {
|
||||
if *form.Sorting < -128 || *form.Sorting > 127 {
|
||||
ctx.APIError(http.StatusBadRequest, "sorting value out of range, must be between -128 and 127")
|
||||
return
|
||||
}
|
||||
column.Sorting = int8(*form.Sorting)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user