Bound session_minutes to its column so an oversized value 422s (#5)
`unifi_vlan_mappings.session_minutes` is `unsignedInteger` (ceiling 4294967295) but the mapping validator only said `integer|min:1`. Anything larger reached the INSERT and raised SQLSTATE 22003, so the request died as an unhandled 500 where a validation error belongs — the same shape just fixed in central-oncall#7. Adds `max:525600` (a year of minutes) to both storeMapping and updateMapping. Found while fixing #5, which reported a *silent* rejection rather than a crash. The VLAN ID validation the issue was actually about was already correct on the server (`min:1|max:4094` on all three forms); what was missing was any way to see it, and that half of the fix is in the shell's Unifi/Portal.vue. Sibling numeric fields were checked at the same time: `vlan_id` (unsignedSmallInteger, bounded 1–4094) and `max_devices` (unsignedTinyInteger, bounded 1–50) were already safe against their columns; `session_minutes` was the only one that could overflow. Version 1.13.3 -> 1.13.4. Test: dashboard-shell tests/Feature/Unifi/VlanGroupValidationTest.php Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "dashboard/unifi",
|
||||
"description": "UniFi network management, WiFi stats, and captive portal authentication for the Dashboard platform",
|
||||
"version": "1.13.3",
|
||||
"version": "1.13.4",
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"autoload": {
|
||||
|
||||
Reference in New Issue
Block a user