Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
outils
question2answer
Commits
6721cb5b
Commit
6721cb5b
authored
Feb 24, 2016
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary parameters
parent
8bf53b11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
limits.php
qa-include/app/limits.php
+4
-4
ip.php
qa-include/pages/ip.php
+1
-1
No files found.
qa-include/app/limits.php
View file @
6721cb5b
...
...
@@ -191,8 +191,8 @@
if
(
filter_var
(
$matches
[
1
],
FILTER_VALIDATE_IP
)
&&
filter_var
(
$matches
[
2
],
FILTER_VALIDATE_IP
)
)
{
if
(
filter_var
(
$ip
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV6
)){
$ip
=
ipv6_expand
(
$ip
);
$matches
[
1
]
=
ipv6_expand
(
$matches
[
1
]
,
true
);
$matches
[
2
]
=
ipv6_expand
(
$matches
[
2
]
,
true
);
$matches
[
1
]
=
ipv6_expand
(
$matches
[
1
]);
$matches
[
2
]
=
ipv6_expand
(
$matches
[
2
]);
}
$iplong
=
ipv6_numeric
(
$ip
);
$end1long
=
ipv6_numeric
(
$matches
[
1
]);
...
...
@@ -201,8 +201,8 @@
}
}
elseif
(
strlen
(
$blockipclause
)){
if
(
filter_var
(
$ip
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV6
)){
$ip
=
ipv6_expand
(
$ip
,
true
);
$blockipclause
=
ipv6_expand
(
$blockipclause
,
true
);
$ip
=
ipv6_expand
(
$ip
);
$blockipclause
=
ipv6_expand
(
$blockipclause
);
}
return
preg_match
(
'/^'
.
str_replace
(
'\\*'
,
'[0-9a-fA-F]+'
,
preg_quote
(
$blockipclause
,
'/'
))
.
'$/'
,
$ip
)
>
0
;
// preg_quote misses hyphens but that is OK here
...
...
qa-include/pages/ip.php
View file @
6721cb5b
...
...
@@ -30,7 +30,7 @@
$ip
=
qa_request_part
(
1
);
// picked up from qa-page.php
if
(
filter_var
(
$ip
,
FILTER_VALIDATE_IP
,
FILTER_FLAG_IPV4
|
FILTER_FLAG_IPV6
)
===
false
)
if
(
filter_var
(
$ip
,
FILTER_VALIDATE_IP
)
===
false
)
return
include
QA_INCLUDE_DIR
.
'qa-page-not-found.php'
;
...
...
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