Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
4ccc9d89
Commit
4ccc9d89
authored
Apr 19, 2013
by
Thomas Tanghus
Browse files
Merge pull request #3010 from owncloud/fix-cookie_path
Don't use empty session.cookie_path, otherwise we get multiple cookies
parents
1ad0c111
e4876c91
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/base.php
View file @
4ccc9d89
...
...
@@ -324,7 +324,8 @@ class OC {
ini_set
(
'session.cookie_httponly'
,
'1;'
);
// set the cookie path to the ownCloud directory
ini_set
(
'session.cookie_path'
,
OC
::
$WEBROOT
);
$cookie_path
=
OC
::
$WEBROOT
?:
'/'
;
ini_set
(
'session.cookie_path'
,
$cookie_path
);
// set the session name to the instance id - which is unique
session_name
(
OC_Util
::
getInstanceId
());
...
...
@@ -357,7 +358,7 @@ class OC {
// session timeout
if
(
isset
(
$_SESSION
[
'LAST_ACTIVITY'
])
&&
(
time
()
-
$_SESSION
[
'LAST_ACTIVITY'
]
>
60
*
60
*
24
))
{
if
(
isset
(
$_COOKIE
[
session_name
()]))
{
setcookie
(
session_name
(),
''
,
time
()
-
42000
,
OC
::
$WEBROOT
);
setcookie
(
session_name
(),
''
,
time
()
-
42000
,
$cookie_path
);
}
session_unset
();
session_destroy
();
...
...
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