Skip to content

Commit 1077504

Browse files
committed
Rely on the test connection to the MySQL instance rather than trying to validate the host manually; closes pterodactyl#2311; closes pterodactyl#2282
1 parent d86d0fe commit 1077504

File tree

2 files changed

+0
-63
lines changed

2 files changed

+0
-63
lines changed

app/Models/DatabaseHost.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Pterodactyl\Models;
44

5-
use Pterodactyl\Rules\ResolvesToIPAddress;
6-
75
class DatabaseHost extends Model
86
{
97
/**
@@ -60,18 +58,6 @@ class DatabaseHost extends Model
6058
'node_id' => 'sometimes|nullable|integer|exists:nodes,id',
6159
];
6260

63-
/**
64-
* @return array
65-
*/
66-
public static function getRules()
67-
{
68-
$rules = parent::getRules();
69-
70-
$rules['host'] = array_merge($rules['host'], [ new ResolvesToIPAddress() ]);
71-
72-
return $rules;
73-
}
74-
7561
/**
7662
* Gets the node associated with a database host.
7763
*

app/Rules/ResolvesToIPAddress.php

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)