Skip to content

Commit 658a959

Browse files
committed
Fix trailing comma in DaemonAuthenticate.php, change ServerDetailsController.php to use node authentication
1 parent a37e30c commit 658a959

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/Http/Controllers/Api/Remote/Servers/ServerDetailsController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ public function __invoke(Request $request, $uuid)
8383
*/
8484
public function list(Request $request)
8585
{
86-
$authorization = substr($request->header('Authorization'), 7);
87-
88-
$node = $this->nodeRepository->findFirstWhere(['daemonSecret' => $authorization]);
86+
$node = $request->attributes->get('node');
8987
$servers = $this->repository->loadEveryServerForNode($node->id);
9088

9189
$configurations = [];

app/Http/Middleware/Api/Daemon/DaemonAuthenticate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function handle(Request $request, Closure $next)
6969
// Ensure that all of the correct parts are provided in the header.
7070
if (count($parts) !== 2 || empty($parts[0]) || empty($parts[1])) {
7171
throw new BadRequestHttpException(
72-
'The Authorization headed provided was not in a valid format.',
72+
'The Authorization headed provided was not in a valid format.'
7373
);
7474
}
7575

0 commit comments

Comments
 (0)