3.2.10 - error in the operation of dns templates

Discussion in 'Installation/Configuration' started by informator001, Jun 8, 2023.

  1. informator001

    informator001 New Member

    DNS templates after update to new version of ISPConfig giving me always 'error_domain_regex'. This happens for different types/names of domains.

    In dns_wizard.inc.php is a hint:
    # fixme: this regex is pretty poor for domain validation
    if(isset($data['domain']) && $data['domain'] == '') $error .= $app->lng('error_domain_empty').'<br />';
    elseif(isset($data['domain']) && !preg_match('/^[\w\.\-]{1,64}\.[a-zA-Z0-9\-]{2,63}$/', $data['domain'])) $error .= $app->lng('error_domain_regex').'<br />';

    Can I get around this somehow?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The regex is not poor in the sense that it's not working, it's poor in the sense that it could be stricter. So that REGEX is likely not causing your issue and it has not been changed for years. Mre likely reasons are that you copy/paste a domain name and it has white space before or after the domain name or other invalid characters, so you should double-check what you entered as domain name. Can you give me an example of which domain is not working?
     
  3. informator001

    informator001 New Member

    For example 'testdomain123.eu'. It seems that whatever I type, it always gets the same result. When I don't use the DNS wizard (I add entries manually) there is no problem. So there must be something wrong with what changed in the code between 3.2.9p1 and 3.2.10.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, I'll check that.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    works fine here, just tested it in 3.2.10 with following example data.
     

    Attached Files:

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Resulting zone created by DNS wizard:
     

    Attached Files:

  7. informator001

    informator001 New Member

    Do you have any suggestions where to look for the cause? Nothing has been done other than the upgrade.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use the domain limit module, so maybe it's related to that?
     
  9. informator001

    informator001 New Member

    The limits are not filled. Maybe the template syntax has changed?

    [ZONE]
    origin={DOMAIN}.
    ns={NS1}.
    mbox={EMAIL}.
    refresh=7200
    retry=540
    expire=604800
    minimum=3600
    ttl=3600

    [DNS_RECORDS]
    A|{DOMAIN}.|{IP}|0|3600
    A|www|{IP}|0|3600
    A|mail|{IP}|0|3600
    NS|{DOMAIN}.|{NS1}.|0|3600
    NS|{DOMAIN}.|{NS2}.|0|3600
    MX|{DOMAIN}.|mail.{DOMAIN}.|10|3600
    TXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Just a guess, you might have enabled the domain limit module under system > interface > main config, which means you must create domains first in client module now. But instead of adding the domain name first in client module and then selecting it in DNS wizard, you tried typing in a new domain name in DNS wizard domain select field (which is a search field to select a domain name and not the place to enter a new domain name when domain limits are enabled).

    And no, syntax has not changed.
     
  11. informator001

    informator001 New Member

    First, I create a domain in the client area. Then I select it from the list in the DNS wizard zone. And then an error occurs. When I use manual addition instead of the wizard (Add new DNS Zone manually) , there is no problem.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    I found the reason for the issue, it's indeed the domain module. I will add a fix for that.
     
    informator001 likes this.
  13. informator001

    informator001 New Member

    Cool! Thank you very much!
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    ahrasis likes this.
  15. informator001

    informator001 New Member

    Thank you! Now everything works as it should.
     
  16. informator001

    informator001 New Member

    e.jpeg
    There is only one small problem. The zone is created by wizard, but not assigned to the client (no assignment). Manual editing zone adds owner.
     
    Last edited: Jun 8, 2023
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you add the zone as admin for the client or were you logged in as client when adding the zone?
     
  18. informator001

    informator001 New Member

    As Admin - Client-> Add Domain.
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. I'll check that.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    ahrasis likes this.

Share This Page