Skip to content

Commit

Permalink
Harden asset checkout validation by requiring ints
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmoore committed Nov 26, 2024
1 parent 30b481b commit fcbd5dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Requests/AssetCheckoutRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public function authorize()
public function rules()
{
$rules = [
'assigned_user' => 'required_without_all:assigned_asset,assigned_location',
'assigned_asset' => 'required_without_all:assigned_user,assigned_location',
'assigned_location' => 'required_without_all:assigned_user,assigned_asset',
'assigned_user' => 'integer|required_without_all:assigned_asset,assigned_location',
'assigned_asset' => 'integer|required_without_all:assigned_user,assigned_location',
'assigned_location' => 'integer|required_without_all:assigned_user,assigned_asset',
'status_id' => 'exists:status_labels,id,deployable,1',
'checkout_to_type' => 'required|in:asset,location,user',
'checkout_at' => [
Expand Down

0 comments on commit fcbd5dc

Please sign in to comment.