fix(onboarding): validate ssh username
This commit is contained in:
parent
ff4794ffec
commit
7c97b8bfb3
1 changed files with 2 additions and 2 deletions
|
|
@ -278,7 +278,7 @@ public function saveServer()
|
||||||
'remoteServerName' => 'required|string',
|
'remoteServerName' => 'required|string',
|
||||||
'remoteServerHost' => 'required|string',
|
'remoteServerHost' => 'required|string',
|
||||||
'remoteServerPort' => 'required|integer',
|
'remoteServerPort' => 'required|integer',
|
||||||
'remoteServerUser' => 'required|string',
|
'remoteServerUser' => 'required|string|regex:/^[a-zA-Z0-9._-]+$/',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->privateKey = formatPrivateKey($this->privateKey);
|
$this->privateKey = formatPrivateKey($this->privateKey);
|
||||||
|
|
@ -467,7 +467,7 @@ public function saveAndValidateServer()
|
||||||
{
|
{
|
||||||
$this->validate([
|
$this->validate([
|
||||||
'remoteServerPort' => 'required|integer|min:1|max:65535',
|
'remoteServerPort' => 'required|integer|min:1|max:65535',
|
||||||
'remoteServerUser' => 'required|string',
|
'remoteServerUser' => 'required|string|regex:/^[a-zA-Z0-9._-]+$/',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->createdServer->update([
|
$this->createdServer->update([
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue