Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
I
ISPConfig 3
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 1,569
    • Issues 1,569
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 32
    • Merge Requests 32
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #3805

Closed
Open
Opened Mar 21, 2016 by David Kreitschmann@dkreitschmann
  • Report abuse
  • New issue
Report abuse New issue

Replace/cleanup DNS hostname validators

I noticed that the validators for DNS entries are different for most forms. Sometimes * is allowed, sometimes _, sometimes none. Often it can result in invalid entries: _ is only allowed at the beginning, - only in the middle of a label.

I think this should be a good validator:

 'validators' => array (  0 => array ( 'type' => 'REGEX',
           'regex' => '/^(\*|(\*\.)?_?([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\._?([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*\.?)$/',
',
           'errmsg'=> 'name_error_regex'),

It allows corner cases, e.g.: * *._asdf._asdf (currently not possible for TXT) asdf.example.com.

but disallows the following invalid records which can currently be entered e.g.: -asdf asd_f asdf*

Assignee
Assign to
3.2
Milestone
3.2
Assign milestone
Time tracking
None
Due date
None
1
Labels
TODO
Assign labels
  • View project labels
Reference: ispconfig/ispconfig3#3805