2 Commits

Author SHA1 Message Date
paired-gate
b01eb91493 Merge commit '7e675e7beb25a8ddcb3f6cc6f0101f0ffd668e1e' into HEAD 2026-11-05 04:46:14 -07:00
central-worker-1
16475ccac1 #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>
2026-11-04 05:53:38 -07:00

View File

@@ -788,7 +788,10 @@ class TicketingSettingsController extends Controller
'name' => 'required|string|max:100', 'name' => 'required|string|max:100',
'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/', 'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/',
'description' => 'nullable|string', '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); PriorityLevel::create($validated);
@@ -806,7 +809,7 @@ class TicketingSettingsController extends Controller
'name' => 'required|string|max:100', 'name' => 'required|string|max:100',
'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/', 'color' => 'required|string|regex:/^#[0-9a-fA-F]{6}$/',
'description' => 'nullable|string', 'description' => 'nullable|string',
'sort_order' => 'required|integer|min:0', 'sort_order' => 'required|integer|min:0|max:65535',
]); ]);
$priority->update($validated); $priority->update($validated);