diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f70aa801d5..668fa77bcbb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,24 @@ This file is a running track of new features and fixes to each version of the pa
This project follows [Semantic Versioning](http://semver.org) guidelines.
+## v3.6.2-beta
+
+### Fixed
+
+- IP Addresses being clipped if too long in the UI (x2)
+- Hostname validation regex in frontend
+- Viewport glitch when a server name or hostname is too long
+- Validation rule not catching special characters from other languages for OS password validation
+
+### Note
+
+If you are developing automation software for Convoy, please implement these regular expressions in your code. Otherwise, your code will error when you send invalid requests.
+- server `account_password` validation
+ - `/^[A-z0-9!@£$%^&*()\'~*_+\-]+$/` to detect special characters from other language
+ - `/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u` minimum password requirements
+- server `hostname` validation
+ - `/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/`
+
## v3.6.1-beta
### Fixed
diff --git a/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php b/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php
index 5d86b16008c..709db3a3b3f 100644
--- a/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php
+++ b/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php
@@ -39,7 +39,7 @@ public function handle(Request $request, Closure $next)
try {
$server->validateCurrentState();
} catch (ServerStateConflictException $exception) {
- if ($request->routeIs('api:client:servers.show')) {
+ if ($request->routeIs('client.servers.show')) {
return $next($request);
}
diff --git a/app/Http/Requests/Admin/Servers/StoreServerRequest.php b/app/Http/Requests/Admin/Servers/StoreServerRequest.php
index 8c4dae6ad17..97b8f0d9478 100644
--- a/app/Http/Requests/Admin/Servers/StoreServerRequest.php
+++ b/app/Http/Requests/Admin/Servers/StoreServerRequest.php
@@ -37,7 +37,7 @@ public function rules()
'limits.bandwidth' => $rules['bandwidth_limit'],
'limits.address_ids' => 'sometimes|nullable|array',
'limits.address_ids.*' => 'integer|exists:ip_addresses,id',
- 'account_password' => ['sometimes', 'nullable', 'string', 'min:8', 'max:191', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u'],
+ 'account_password' => ['sometimes', 'nullable', 'string', 'min:8', 'max:191', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u', 'regex:/^[A-z0-9!@£$%^&*()\'~*_+\-]+$/'],
'should_create_server' => 'present|boolean',
'template_uuid' => 'required_if:create_server,1|string|exists:templates,uuid',
'start_on_completion' => 'present|boolean',
diff --git a/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php b/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php
index 688fee33004..c33f35f527e 100644
--- a/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php
+++ b/app/Http/Requests/Client/Servers/Settings/UpdateSecurityRequest.php
@@ -30,7 +30,7 @@ public function rules()
return [
'type' => [new Enum(AuthenticationType::class), 'required'],
'ssh_keys' => ['nullable', 'string', 'exclude_unless:type,sshkeys'],
- 'password' => ['string', 'min:8', 'max:191', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u', 'exclude_unless:type,cipassword'],
+ 'password' => ['string', 'min:8', 'max:191', 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/u', 'regex:/^[A-z0-9!@£$%^&*()\'~*_+\-]+$/', 'exclude_unless:type,cipassword'],
];
}
diff --git a/resources/scripts/components/admin/servers/CreateServerModal.tsx b/resources/scripts/components/admin/servers/CreateServerModal.tsx
index 5e614849b2e..8ef705ecd75 100644
--- a/resources/scripts/components/admin/servers/CreateServerModal.tsx
+++ b/resources/scripts/components/admin/servers/CreateServerModal.tsx
@@ -55,7 +55,7 @@ const CreateServerModal = ({ nodeId, userId, open, onClose }: Props) => {
.string()
.max(191, 'Do not exceed 191 characters')
.matches(
- /((https?):\/\/)?(www.)?[a-z0-9]+(\.[a-z]{2,}){1,3}(#?\/?[a-zA-Z0-9#]+)*\/?(\?[a-zA-Z0-9-_]+=[a-zA-Z0-9-%]+&?)?$/,
+ /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/,
'Enter a valid hostname'
)
.required(),
@@ -72,6 +72,7 @@ const CreateServerModal = ({ nodeId, userId, open, onClose }: Props) => {
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/,
'Must Contain 8 Characters, One Uppercase, One Lowercase, One Number and One Special Case Character'
)
+ .matches(/^[A-z0-9!@£$%^&*()\'~*_+\-]+$/, 'Must not contain special characters from other languages')
.optional(),
shouldCreateServer: yup.boolean(),
templateUuid: yup.string().when('createServer', {
@@ -170,11 +171,7 @@ const CreateServerModal = ({ nodeId, userId, open, onClose }: Props) => {
placeholder={'Leave blank for no limit'}
/>
-
+ {
return (