Possible bug with erranous domainname?

Discussion in 'Developers' Forum' started by Norman, Apr 11, 2012.

  1. Norman

    Norman Member HowtoForge Supporter

    Since the latest patch some users have noticed that it's possible while creating a site to change to another tab in ispconfig UI.

    If the domain name hasnt been filled out it causes ispconfig to create a ".vhost" file in sites-available and a "100-.vhost" in sites-enabled , rendering a syntax error as the virtualhost domain isnt filled out.

    Removing this file manually fixes the syntax error.

    My suggestion is to add checks to make sure no such domain is created without valid hostname.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thanks for reporting this. Creating websites without domain is possible as it can be used to create ip based virtual hosts that dont have a domain, so the bug is not that the field is empty. I guess the problem is that the ServerName directive is not wrapped in a if stamenet in the vhost template plus the ip should be used for the vhost file name in case that no domain name is present. I will check why it fails now.
    Last edited: Apr 11, 2012
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    I just checked that and I'am not able to save a website or change the tab when the domain field is empty in ISPConfig If I remember now we removed the ip based vhost without domain name function some time ago as nobody used it.

    Are you sure that you use ispconfig on that server and not a older or customized version? If yes, please describe as detailed as possible which clicks you made and what you entered in which field and as which user you were logged in so that I can try to reproduce that.
  4. Norman

    Norman Member HowtoForge Supporter


    I dont know the exact steps that were taken.
    But this was after the latest update as the security update had been published and we promptly update the customers server.

    I will try to see if the customer can repeat this somehow.
  5. Norman

    Norman Member HowtoForge Supporter

    User is not 100% sure what he did.
    He had two tabs up. One with another site to compare settings.
    He said he clicked the next tab without filling in domain on the new site, a big red warning sign came up and he clicked cancel before creating the site again.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I'am not able to reproduce that on my servers and the number of open tabs should not matter as all values are checked when they get posted on the server side. Please let me know if you are able to reproduce it.

    -- Update

    I added a second level check for empty domain field in the apache plugin that skips processing of the vhost when the domain name field is empty, just in case that a empty domain name can slip trough the interface checks.
    Last edited: Apr 16, 2012

Share This Page