Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Manoa Ratefiarison
ISPConfig 3
Commits
e42fd832
Commit
e42fd832
authored
6 years ago
by
Rajko Albrecht
Browse files
Options
Downloads
Patches
Plain Diff
Comments
parent
0344bc52
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
interface/lib/app.inc.php
+8
-1
8 additions, 1 deletion
interface/lib/app.inc.php
with
8 additions
and
1 deletion
interface/lib/app.inc.php
+
8
−
1
View file @
e42fd832
...
...
@@ -338,6 +338,11 @@ class app {
if
(
$proxy_panel_allowed
==
'all'
)
{
return
''
;
}
/*
* See ticket #5238: It should be ensured, that _SERVER_NAME is always set.
* Otherwise the security improvement doesn't work with nginx. If this is done,
* the check for HTTP_HOST and workaround for nginx is obsolete.
*/
$cookie_domain
=
(
isset
(
$_SERVER
[
'SERVER_NAME'
])
?
$_SERVER
[
'SERVER_NAME'
]
:
$_SERVER
[
'HTTP_HOST'
]);
// Workaround for Nginx servers
if
(
$cookie_domain
==
'_'
)
{
...
...
@@ -348,6 +353,7 @@ class app {
if
(
$proxy_panel_allowed
==
'sites'
)
{
$forwarded_host
=
(
isset
(
$_SERVER
[
'HTTP_X_FORWARDED_HOST'
])
?
$_SERVER
[
'HTTP_X_FORWARDED_HOST'
]
:
null
);
if
(
$forwarded_host
!==
null
&&
$forwarded_host
!==
$cookie_domain
)
{
// Just check for complete domain name and not auto subdomains
$sql
=
"SELECT domain_id from web_domain where domain = '
$forwarded_host
'"
;
$recs
=
$this
->
db
->
queryOneRecord
(
$sql
);
if
(
$recs
!==
null
)
{
...
...
@@ -365,7 +371,8 @@ class app {
//** Initialize application (app) object
//* possible future = new app($conf);
$app
=
new
app
();
/* split session creation out of constructor is IMHO better.
/*
split session creation out of constructor is IMHO better.
otherwise we have some circular references to global $app like in
getconfig property of App - RA
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment