Skip to content

DNS zone file import always fails

Summary

Importing a DNS zone file always fails with the following error:

This zone is not allowed for this account.
This zone file appears invalid.

Steps to reproduce

  1. Go to the Zone File Import page
  2. Select a client and domain
  3. Click "Browse" and select a valid DNS zone file
  4. Click "Import Zonefile" - Nothing happens
  5. Open the browser dev tools, go to the Network tab, find the request to /dns/dns_import.php and check the Response.

Correct behaviour

The zone file should be imported

Environment

Server OS + version: Debian 10
ISPConfig version: 3.2.8p1

Software version of the related software:

# apachectl -v
Server version: Apache/2.4.38 (Debian)
Server built:   2021-12-21T16:50:43

# php -v
PHP 7.3.33-1+0~20211119.91+debian10~1.gbp618351 (cli) (built: Nov 19 2021 06:39:58) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.33-1+0~20211119.91+debian10~1.gbp618351, Copyright (c) 1999-2018, by Zend Technologies

Proposed fix

This is because the valid domain check is done by passing the domain name into checkDomainModuleDomain, which is expecting a domain ID.

Edited by Thom