Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1,574
Issues
1,574
List
Boards
Labels
Milestones
Merge Requests
31
Merge Requests
31
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISPConfig
ISPConfig 3
Commits
352d6a49
Commit
352d6a49
authored
Dec 14, 2017
by
Florian Schaal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server_ip_add not working by API (Fixes #4884)
parent
2ae1eb77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
interface/lib/classes/validate_server.inc.php
interface/lib/classes/validate_server.inc.php
+6
-2
No files found.
interface/lib/classes/validate_server.inc.php
View file @
352d6a49
...
...
@@ -46,11 +46,15 @@ class validate_server {
* Validator function for server-ip
*/
function
check_server_ip
(
$field_name
,
$field_value
,
$validator
)
{
if
(
$_POST
[
'ip_type'
]
==
'IPv4'
)
{
global
$app
;
$type
=
(
isset
(
$app
->
remoting_lib
->
dataRecord
[
'ip_type'
]))
?
$app
->
remoting_lib
->
dataRecord
[
'ip_type'
]
:
$_POST
[
'ip_type'
];
if
(
$type
==
'IPv4'
)
{
if
(
!
filter_var
(
$field_value
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV4
))
{
return
$this
->
get_error
(
$validator
[
'errmsg'
]);
}
}
elseif
(
$
_POST
[
'ip_type'
]
==
'IPv6'
)
{
}
elseif
(
$
type
==
'IPv6'
)
{
if
(
!
filter_var
(
$field_value
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV6
))
{
return
$this
->
get_error
(
$validator
[
'errmsg'
]);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment