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
92a5f77a
Commit
92a5f77a
authored
Jul 21, 2015
by
Ad Schellevis
Committed by
Franco Fichtner
Jul 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) remove a lot of dependencies in authgui.inc by replacing the ip lookup
parent
93bfc740
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
authgui.inc
src/etc/inc/authgui.inc
+13
-8
No files found.
src/etc/inc/authgui.inc
View file @
92a5f77a
...
...
@@ -398,7 +398,6 @@ function display_login_form()
/* Check against locally configured IP addresses, which will catch when someone
port forwards WebGUI access from WAN to an internal IP on the router. */
$FilterIflist
=
filter_generate_optcfg_array
()
;
$local_ip
=
false
;
if
(
strstr
(
$_SERVER
[
'HTTP_HOST'
],
":"
))
{
$http_host_port
=
explode
(
":"
,
$_SERVER
[
'HTTP_HOST'
]);
...
...
@@ -406,14 +405,20 @@ function display_login_form()
}
else
{
$http_host
=
$_SERVER
[
'HTTP_HOST'
];
}
foreach
(
$FilterIflist
as
$iflist
)
{
if
(
$iflist
[
'ip'
]
==
$http_host
)
{
// fix, local ip check was previously done using "filter_generate_optcfg_array" which basically includes alomst everything here.
// this should do the trick as well.
if
(
isset
(
$config
[
'interfaces'
]))
{
foreach
(
$config
[
'interfaces'
]
as
$if
=>
$ifdetail
)
{
if
(
isset
(
$ifdetail
[
'enable'
]))
{
if
(
isset
(
$ifdetail
[
'ipaddr'
])
&&
$ifdetail
[
'ipaddr'
]
==
$http_host
)
{
$local_ip
=
true
;
}
if
(
$iflist
[
'ipv6'
]
==
$http_host
)
{
}
elseif
(
isset
(
$ifdetail
[
'ipaddr6'
])
&&
$ifdetail
[
'ipaddr6'
]
==
$http_host
)
{
$local_ip
=
true
;
}
}
}
}
if
(
isset
(
$config
[
'virtualip'
][
'vip'
]))
{
foreach
(
$config
[
'virtualip'
][
'vip'
]
as
$vip
)
{
...
...
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