#6081: statuses store 422s on oversized sort_order instead of 500
sort_order was validated as integer|min:0 with no upper bound, but the column is an unsigned smallint (0..65535). A client-supplied value above the ceiling passed validation and overflowed the column on INSERT/UPDATE, surfacing as an unhandled 500. Added max:65535 to both storeStatus and updateStatus, which take the same client field through the same rule.
This commit is contained in:
@@ -933,7 +933,7 @@ class TicketingSettingsController extends Controller
|
||||
$validated = $request->validate([
|
||||
'name' => 'required|string|max:100',
|
||||
'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/',
|
||||
'sort_order' => 'required|integer|min:0',
|
||||
'sort_order' => 'required|integer|min:0|max:65535',
|
||||
'is_closed' => 'boolean',
|
||||
]);
|
||||
|
||||
@@ -964,7 +964,7 @@ class TicketingSettingsController extends Controller
|
||||
$validated = $request->validate([
|
||||
'name' => 'required|string|max:100',
|
||||
'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/',
|
||||
'sort_order' => 'required|integer|min:0',
|
||||
'sort_order' => 'required|integer|min:0|max:65535',
|
||||
'is_closed' => 'boolean',
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user