Details
-
Type:
Improvement
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.0-b1
-
Component/s: None
-
Labels:None
Description
See https://github.com/blesta/module-pterodactyl/issues/66
In components/modules/pterodactyl/pterodactyl.php around line 408 change
'host_name' => [
'valid' => [
'rule' => function ($host_name) {
$validator = new Server();
$parts = explode(':', $host_name);
return $validator->isDomain($parts[0]) || $validator->isIp($parts[0]);
},
'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
]
],
To
'host_name' => [
'valid' => [
'rule' => function ($host_name) {
$validator = new Server();
$parts = explode(':', $host_name);
return ($validator->isDomain($parts[0]) || $validator->isIp($parts[0]))
&& (!isset($parts[1]) || is_numeric($parts[1]));
},
'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
]
],