mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-23 01:22:30 +01:00
Stop Dane from submitting invalid arrays and breaking the entire application...
This commit is contained in:
parent
aaf96669d4
commit
e2cb789b2b
@ -249,6 +249,10 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
|
||||
Assert::boolean($validate, 'Third argument passed to updateOrCreate must be boolean, received %s.');
|
||||
Assert::boolean($force, 'Fourth argument passed to updateOrCreate must be boolean, received %s.');
|
||||
|
||||
foreach ($where as $item) {
|
||||
Assert::true(is_scalar($item) || is_null($item), 'First argument passed to updateOrCreate should be an array of scalar or null values, received an array value of %s.');
|
||||
}
|
||||
|
||||
$instance = $this->withColumns('id')->findWhere($where)->first();
|
||||
|
||||
if (! $instance) {
|
||||
|
Loading…
Reference in New Issue
Block a user