mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-19 17:15:55 +02:00
RST related EPP server fixes
This commit is contained in:
parent
daf8e630bf
commit
8d3493bb7a
6 changed files with 63 additions and 40 deletions
|
@ -225,6 +225,9 @@ function validate_label($domain, $db) {
|
|||
if (strpos($domain, '.') === false) {
|
||||
return 'Invalid domain name format: must contain at least one dot (.)';
|
||||
}
|
||||
if ($domain[0] === '.' || substr($domain, -1) === '.') {
|
||||
return 'Invalid domain name format: cannot start or end with a dot (.)';
|
||||
}
|
||||
|
||||
// Split domain into labels (subdomains, SLD, TLD)
|
||||
$labels = explode('.', $domain);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue