Wrong/Useless regex in DNS API endpoint
short description
Wrong (and useless) regex makes DNS domains unavailable via the API. The regex is in the function called when a zone ID is needed (e.g., to add a TXT record to it), that is interface/lib/classes/remote.d/dns.inc.php around line 241. The regex is:
/^[a-z0-9][a-z0-9\-]+[a-z0-9](\.[a-z]{2,4})+$/i
As per it, any domain which TLD has more than 3 letters cannot be managed via the API (e.g., any domain in .world, .swiss, .muenchen etc., etc.) - because the regex raises "invalid entry" exception.
correct behaviour
All DNS domains in the system should be available via the API
environment
Server OS: Ubuntu Server OS version: 16.04 ISPConfig version: 3.1.5
proposed fix
Remove the useless regex. Since a .world domain can be added and managed via the web interface, there is no reason for the regex to exist in the API only.