mirror of
https://github.com/pterodactyl/panel.git
synced 2024-11-26 02:52:30 +01:00
Fix improper allocation id validation on API
This commit is contained in:
parent
a9c1946319
commit
db29b04c39
@ -7,6 +7,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||
### Fixed
|
||||
* `[rc.2]` — Fixes bad API behavior on `/user` routes.
|
||||
* `[rc.2]` — Fixes Admin CP user editing resetting a password on users unintentionally.
|
||||
* `[rc.2]` — Fixes bug with server creation API endpoint that would fail to validate `allocation.default` correctly.
|
||||
|
||||
### Added
|
||||
* Added ability to search the following API endpoints: list users, list servers, and list locations.
|
||||
|
@ -101,7 +101,6 @@ class StoreServerRequest extends ApplicationApiRequest
|
||||
$validator->sometimes('allocation.default', [
|
||||
'required', 'integer', 'bail',
|
||||
Rule::exists('allocations', 'id')->where(function ($query) {
|
||||
$query->where('node_id', $this->input('node_id'));
|
||||
$query->whereNull('server_id');
|
||||
}),
|
||||
], function ($input) {
|
||||
@ -111,7 +110,6 @@ class StoreServerRequest extends ApplicationApiRequest
|
||||
$validator->sometimes('allocation.additional.*', [
|
||||
'integer',
|
||||
Rule::exists('allocations', 'id')->where(function ($query) {
|
||||
$query->where('node_id', $this->input('node_id'));
|
||||
$query->whereNull('server_id');
|
||||
}),
|
||||
], function ($input) {
|
||||
|
Loading…
Reference in New Issue
Block a user