Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
a2b70b49
Commit
a2b70b49
authored
11 years ago
by
Jared Hancock
Browse files
Options
Downloads
Patches
Plain Diff
Ensure cookie path is set for the session cookie
parent
ea1ed4f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class.osticket.php
+10
-0
10 additions, 0 deletions
include/class.osticket.php
main.inc.php
+4
-2
4 additions, 2 deletions
main.inc.php
with
14 additions
and
2 deletions
include/class.osticket.php
+
10
−
0
View file @
a2b70b49
...
...
@@ -352,6 +352,16 @@ class osTicket {
return
null
;
}
/**
* Returns TRUE if the request was made via HTTPS and false otherwise
*/
function
is_https
()
{
return
(
isset
(
$_SERVER
[
'HTTPS'
])
&&
strtolower
(
$_SERVER
[
'HTTPS'
])
==
'on'
)
||
(
isset
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
])
&&
strtolower
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
])
==
'https'
);
}
/* returns true if script is being executed via commandline */
function
is_cli
()
{
return
(
!
strcasecmp
(
substr
(
php_sapi_name
(),
0
,
3
),
'cli'
)
...
...
This diff is collapsed.
Click to expand it.
main.inc.php
+
4
−
2
View file @
a2b70b49
...
...
@@ -34,8 +34,6 @@
ini_set
(
'session.use_trans_sid'
,
0
);
#No cache
session_cache_limiter
(
'nocache'
);
#Cookies
//ini_set('session.cookie_path','/osticket/');
#Error reporting...Good idea to ENABLE error reporting to a file. i.e display_errors should be set to false
$error_reporting
=
E_ALL
&
~
E_NOTICE
;
...
...
@@ -128,6 +126,10 @@
else
require
(
INCLUDE_DIR
.
'mysql.php'
);
#Cookies
session_set_cookie_params
(
86400
,
dirname
(
$_SERVER
[
'PHP_SELF'
]),
$_SERVER
[
'HTTP_HOST'
],
osTicket
::
is_https
());
#CURRENT EXECUTING SCRIPT.
define
(
'THISPAGE'
,
Misc
::
currentURL
());
define
(
'THISURI'
,
$_SERVER
[
'REQUEST_URI'
]);
...
...
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