#6154: priorities 422 on an oversized sort_order instead of 500
`ticketing_priority_levels.sort_order` is an unsigned smallint (0..65535), the same shape as `ticketing_statuses.sort_order`, but storePriority() and updatePriority() validated it as `integer|min:0` with no upper bound. A value past the ceiling passed validation and overflowed the column on INSERT/UPDATE as an unhandled 500 — reachable by typing into the Sort Order box, which is a plain `type="number" min="0"`. #6081 put `max:65535` on storeStatus()/updateStatus() and left this identical pair untouched. Same rule, same two places. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -763,7 +763,10 @@ class TicketingSettingsController extends Controller
|
||||
'name' => 'required|string|max:100',
|
||||
'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/',
|
||||
'description' => 'nullable|string',
|
||||
'sort_order' => 'integer|min:0',
|
||||
// unsignedSmallInteger column (0..65535): without the ceiling an
|
||||
// oversized client value overflows on INSERT as an unhandled 500.
|
||||
// Same rule #6081 put on storeStatus()/updateStatus().
|
||||
'sort_order' => 'integer|min:0|max:65535',
|
||||
]);
|
||||
|
||||
PriorityLevel::create($validated);
|
||||
@@ -781,7 +784,7 @@ class TicketingSettingsController extends Controller
|
||||
'name' => 'required|string|max:100',
|
||||
'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/',
|
||||
'description' => 'nullable|string',
|
||||
'sort_order' => 'required|integer|min:0',
|
||||
'sort_order' => 'required|integer|min:0|max:65535',
|
||||
]);
|
||||
|
||||
$priority->update($validated);
|
||||
|
||||
Reference in New Issue
Block a user