Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Hj Ahmad Rasyid Hj Ismail
ISPConfig 3
Commits
5d0e31b7
Commit
5d0e31b7
authored
Dec 22, 2020
by
Thom
🛠
Browse files
Apply suggestion from
!1358
parent
571ca4e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/validate_dns.inc.php
View file @
5d0e31b7
...
...
@@ -305,10 +305,12 @@ class validate_dns {
// Check if it's a valid input
foreach
(
$field_value_array
as
$field_value
)
{
// Check if the IP is valid without range
$ip
=
strstr
(
$field_value
,
'/'
,
true
)
?:
$field_value
;
if
(
strpos
(
$field_value
,
'/'
)
!==
false
)
{
$subnet
=
strstr
(
$field_value
,
'/'
,
false
);
$subnet
=
ltrim
(
$subnet
,
"/"
);
$subnet
=
''
;
$ip
=
$field_value
;
if
(
strpos
(
$ip
,
'/'
)
!==
false
)
{
list
(
$ip
,
$subnet
)
=
explode
(
'/'
,
$ip
,
2
);
$ip
=
trim
(
$ip
);
$subnet
=
intval
(
$subnet
);
}
if
(
function_exists
(
'filter_var'
))
{
if
(
!
filter_var
(
$ip
,
FILTER_VALIDATE_IP
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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