RST related EPP server fixes

This commit is contained in:
Pinga 2025-07-09 11:41:20 +03:00
parent daf8e630bf
commit 8d3493bb7a
6 changed files with 63 additions and 40 deletions

View file

@ -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);