From 65320ffcaccb52fb9cfc1a8e04ffc1aac9137e03 Mon Sep 17 00:00:00 2001 From: Oreo Oreoniv <28255085+zKoz210@users.noreply.github.com> Date: Tue, 22 Sep 2020 11:56:24 +0300 Subject: [PATCH] Fixed mistake --- .../Api/Remote/SftpAuthenticationController.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/Remote/SftpAuthenticationController.php b/app/Http/Controllers/Api/Remote/SftpAuthenticationController.php index 6afee87f..defe7332 100644 --- a/app/Http/Controllers/Api/Remote/SftpAuthenticationController.php +++ b/app/Http/Controllers/Api/Remote/SftpAuthenticationController.php @@ -112,9 +112,15 @@ class SftpAuthenticationController extends Controller // Remeber, for security purposes, only reveal the existence of the server to people that // have provided valid credentials, and have permissions to know about it. - if (! $user->root_admin && ($server->installed !== 1 || $server->suspended)) { + if ($server->installed !== 1) { throw new BadRequestHttpException( - 'Server is not installed or is currently suspended.' + 'Server is not installed.' + ); + } + + if (! $user->root_admin && $server->suspended) { + throw new BadRequestHttpException( + 'Server is currently suspended.' ); }