mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-08 12:03:21 +02:00
EPP check improvements
This commit is contained in:
parent
1f3fc19919
commit
2dff2f9b10
1 changed files with 6 additions and 1 deletions
|
@ -76,7 +76,12 @@ function processHostCheck($conn, $db, $xml, $trans) {
|
|||
foreach ($hosts as $host) {
|
||||
$host = (string)$host;
|
||||
|
||||
if (preg_match('/^\.[a-z]{2,}$/i', $host) || preg_match('/^[a-z]{2,}$/i', $host)) {
|
||||
if (
|
||||
strpos($host, '.') === false || // No dot = not FQDN
|
||||
preg_match('/^\./', $host) || // Starts with dot
|
||||
preg_match('/^-/', $host) || // Starts with dash
|
||||
preg_match('/[^\w.-]/', $host) // Invalid characters
|
||||
) {
|
||||
sendEppError($conn, $db, 2306, 'Host name must be fully qualified (FQDN)', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue