Merge branch 'develop' into matthewpi/security-keys-backport
This commit is contained in:
commit
f631ac1946
1153 changed files with 25099 additions and 37002 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Pterodactyl\Http\Requests\Api\Client\Account;
|
||||
|
||||
use Exception;
|
||||
use phpseclib3\Crypt\DSA;
|
||||
use phpseclib3\Crypt\RSA;
|
||||
use Pterodactyl\Models\UserSSHKey;
|
||||
|
@ -71,7 +70,7 @@ class StoreSSHKeyRequest extends ClientApiRequest
|
|||
public function getKeyFingerprint(): string
|
||||
{
|
||||
if (!$this->key) {
|
||||
throw new Exception('The public key was not properly loaded for this request.');
|
||||
throw new \Exception('The public key was not properly loaded for this request.');
|
||||
}
|
||||
|
||||
return $this->key->getFingerprint('sha256');
|
||||
|
|
|
@ -11,6 +11,7 @@ use Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException;
|
|||
class UpdateEmailRequest extends ClientApiRequest
|
||||
{
|
||||
/**
|
||||
* @throws \Illuminate\Contracts\Container\BindingResolutionException
|
||||
* @throws \Pterodactyl\Exceptions\Http\Base\InvalidPasswordProvidedException
|
||||
*/
|
||||
public function authorize(): bool
|
||||
|
|
|
@ -21,6 +21,7 @@ class StoreDatabaseRequest extends ClientApiRequest implements ClientPermissions
|
|||
|
||||
public function rules(): array
|
||||
{
|
||||
/** @var Server $server */
|
||||
$server = $this->route()->parameter('server');
|
||||
|
||||
Assert::isInstanceOf($server, Server::class);
|
||||
|
|
|
@ -13,6 +13,6 @@ class DownloadFileRequest extends ClientApiRequest
|
|||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return $this->user()->can('file.read', $this->parameter('server', Server::class));
|
||||
return $this->user()->can('file.read', $this->route()->parameter('server'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,6 @@ abstract class SubuserRequest extends ClientApiRequest
|
|||
// Otherwise, get the current subuser's permission set, and ensure that the
|
||||
// permissions they are trying to assign are not _more_ than the ones they
|
||||
// already have.
|
||||
/** @var \Pterodactyl\Models\Subuser|null $subuser */
|
||||
/** @var \Pterodactyl\Services\Servers\GetUserPermissionsService $service */
|
||||
$service = $this->container->make(GetUserPermissionsService::class);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue