fix(onboarding): validate ssh username

This commit is contained in:
ShadowArcanist committed 2026-05-06 21:21:57 +05:30
1 parent ff4794ffec
commit 7c97b8bfb3
1 file changed
+2 -2
+2 -2
View File
@@ -278,7 +278,7 @@ class Index extends Component
'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 @@ class Index extends Component
{ {
$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([