Have the panel handle all of the authorization for both public key and password based attempts
This commit is contained in:
parent
e856daee19
commit
412ac5ef39
2 changed files with 4 additions and 8 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
namespace Pterodactyl\Http\Requests\Api\Remote;
|
||||
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SftpAuthenticationFormRequest extends FormRequest
|
||||
|
@ -27,9 +26,7 @@ class SftpAuthenticationFormRequest extends FormRequest
|
|||
return [
|
||||
'type' => ['nullable', 'in:password,public_key'],
|
||||
'username' => ['required', 'string'],
|
||||
'password' => [
|
||||
Rule::when(fn () => $this->input('type') !== 'public_key', ['required', 'string'], ['nullable']),
|
||||
],
|
||||
'password' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue