forked from Alex/Pterodactyl-Panel
Fix trailing comma in DaemonAuthenticate.php, change ServerDetailsController.php to use node authentication
This commit is contained in:
parent
a37e30cd49
commit
658a959e5d
@ -83,9 +83,7 @@ class ServerDetailsController extends Controller
|
||||
*/
|
||||
public function list(Request $request)
|
||||
{
|
||||
$authorization = substr($request->header('Authorization'), 7);
|
||||
|
||||
$node = $this->nodeRepository->findFirstWhere(['daemonSecret' => $authorization]);
|
||||
$node = $request->attributes->get('node');
|
||||
$servers = $this->repository->loadEveryServerForNode($node->id);
|
||||
|
||||
$configurations = [];
|
||||
|
@ -69,7 +69,7 @@ class DaemonAuthenticate
|
||||
// Ensure that all of the correct parts are provided in the header.
|
||||
if (count($parts) !== 2 || empty($parts[0]) || empty($parts[1])) {
|
||||
throw new BadRequestHttpException(
|
||||
'The Authorization headed provided was not in a valid format.',
|
||||
'The Authorization headed provided was not in a valid format.'
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user