forked from Alex/Pterodactyl-Panel
Fix broken port deletion
This commit is contained in:
parent
efdc3e6fd8
commit
644c07ea3a
@ -6,6 +6,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
|
||||
## v0.6.0-pre.4 (Courageous Carniadactylus)
|
||||
### Fixed
|
||||
* `[pre.3]` — Fixes bug in cache handler that doesn't cache against the user making the request. Would have allowed for users to access servers not belonging to themselves in production.
|
||||
* `[pre.3]` — Fixes misnamed MySQL column that was causing the inability to delete certain port ranges from the database.
|
||||
|
||||
### Added
|
||||
* New cache policy for ServerPolicy to avoid making 15+ queries per page load when confirming if a user has permission to perform an action.
|
||||
|
@ -163,7 +163,7 @@ class NodesController extends Controller
|
||||
|
||||
public function deallocateBlock(Request $request, $node)
|
||||
{
|
||||
$query = Models\Allocation::where('node', $node)->whereNull('server_id')->where('ip', $request->input('ip'))->delete();
|
||||
$query = Models\Allocation::where('node_id', $node)->whereNull('server_id')->where('ip', $request->input('ip'))->delete();
|
||||
if ((int) $query === 0) {
|
||||
Alert::danger('There was an error while attempting to delete allocations on that IP.')->flash();
|
||||
|
||||
@ -199,7 +199,7 @@ class NodesController extends Controller
|
||||
|
||||
public function getAllocationsJson(Request $request, $id)
|
||||
{
|
||||
$allocations = Models\Allocation::select('ip')->where('node', $id)->groupBy('ip')->get();
|
||||
$allocations = Models\Allocation::select('ip')->where('node_id', $id)->groupBy('ip')->get();
|
||||
|
||||
return response()->json($allocations);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user