Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ISPConfig 3
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 552
    • Issues 552
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 45
    • Merge requests 45
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #4884
Closed
Open
Created Dec 14, 2017 by WHO@who

server_ip_add not working by API

short description

Always getting "ip_error_wrong" (IP is correct). Reason: $_POST['ip_type'] is empty (***) , but it is in the $params array

function check_server_ip($field_name, $field_value, $validator) { if($_POST['ip_type'] == 'IPv4') { if(!filter_var($field_value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { return $this->get_error($validator['errmsg']); } } elseif ($_POST['ip_type'] == 'IPv6') { if(!filter_var($field_value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { return $this->get_error($validator['errmsg']); } } else return $this->get_error($validator['errmsg']); (***) }

correct behaviour

environment

Server OS: Debian Server OS version: Stretch ISPConfig version: 3.1.9

Assignee
Assign to
Time tracking