1
1
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:
Dane Everitt 2018-02-07 22:50:22 -06:00
parent a9c1946319
commit db29b04c39
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 1 additions and 2 deletions

View File

@ -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.

View File

@ -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) {