Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Kulya
OpnSense
Commits
fb2f4c3f
Commit
fb2f4c3f
authored
Jul 31, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) let's try not to overcomplicate that last thing....
parent
916868f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
auth.inc
src/etc/inc/auth.inc
+11
-18
No files found.
src/etc/inc/auth.inc
View file @
fb2f4c3f
...
...
@@ -182,33 +182,26 @@ $userindex = index_users();
function
isAuthLocalIP
(
$http_host
)
{
global
$config
;
$local_ip
=
false
;
$interface_list_ips
=
get_configured_ip_addresses
();
foreach
(
$interface_list_ips
as
$ilips
)
{
if
(
strcasecmp
(
$http_host
,
$ilips
)
==
0
)
{
$local_ip
=
true
;
break
;
return
true
;
}
}
if
(
!
$local_ip
)
{
$interface_list_ipv6s
=
get_configured_ipv6_addresses
();
foreach
(
$interface_list_ipv6s
as
$ilipv6s
)
{
if
(
strcasecmp
(
$http_host
,
$ilipv6s
)
==
0
)
{
$local_ip
=
true
;
break
;
}
$interface_list_ipv6s
=
get_configured_ipv6_addresses
();
foreach
(
$interface_list_ipv6s
as
$ilipv6s
)
{
if
(
strcasecmp
(
$http_host
,
$ilipv6s
)
==
0
)
{
return
true
;
}
if
(
!
$local_ip
)
{
if
(
isset
(
$config
[
'virtualip'
][
'vip'
]))
{
foreach
(
$config
[
'virtualip'
][
'vip'
]
as
$vip
)
{
if
(
$vip
[
'subnet'
]
==
$http_host
)
{
$local_ip
=
true
;
}
}
}
if
(
isset
(
$config
[
'virtualip'
][
'vip'
]))
{
foreach
(
$config
[
'virtualip'
][
'vip'
]
as
$vip
)
{
if
(
$vip
[
'subnet'
]
==
$http_host
)
{
return
true
;
}
}
}
return
$local_ip
;
return
false
;
}
function
index_groups
()
...
...
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