Skip to content
Permalink
Browse files

Remove unneeded cookie_domain config option, since it's really only a…

… long-winded way of calling ini_set
  • Loading branch information...
flack committed Mar 11, 2019
1 parent 7e4c420 commit 0479c12b7593c6e1d63976281967e0194279f873
Showing with 3 additions and 11 deletions.
  1. +0 −5 lib/midcom/config/main.php
  2. +0 −1 lib/midcom/services/_sessioning.php
  3. +3 −5 lib/midcom/services/auth/backend/simple.php
@@ -72,10 +72,6 @@
* auth cookies for different sites. Defaults to 1.
* - <b>auth_backend_simple_cookie_path:</b> Controls the valid path of the cookie,
* defaults to midcom_connection::get_url('self').
* - <b>auth_backend_simple_cookie_domain:</b> Controls the valid domain of the cookie.
* If it is set to null (the default), no domain is specified in the cookie, making
* it a traditional site-specific session cookie. If it is set, the domain parameter
* of the cookie will be set accordingly.
*
* <b>Cache configuration</b>
*
@@ -281,7 +277,6 @@ class midcom_config implements ArrayAccess
'person_class' => 'openpsa_person',
'auth_backend_simple_cookie_path' => 'auto',
'auth_backend_simple_cookie_domain' => null,
// set secure flag on cookie (applies only when using SSL)
'auth_backend_simple_cookie_secure' => true,
@@ -68,7 +68,6 @@ protected function prepare_storage($cookie_path, $cookie_secure)
return new NativeSessionStorage([
'cookie_path' => $cookie_path,
'cookie_secure' => $cookie_secure,
'cookie_domain' => midcom::get()->config->get('auth_backend_simple_cookie_domain'),
'cookie_httponly' => true
]);
}
@@ -12,12 +12,10 @@
* The simple auth backend uses cookies to store a session identifier which
* consists of the midgard person GUID.
*
* The validity of the cookie will be controlled by the configuration options
* <i>auth_backend_simple_cookie_path</i> and <i>auth_backend_simple_cookie_domain</i>:
* The validity of the cookie will be controlled by the configuration option
* <i>auth_backend_simple_cookie_path</i>:
*
* The path defaults to midcom_connection::get_url('self'). If the domain is set to null (the default),
* no domain is specified in the cookie, making it a traditional site-specific session
* cookie. If it is set, the domain parameter of the cookie will be set accordingly.
* The path defaults to midcom_connection::get_url('self').
*
* The basic cookie id (username prefix) is taken from the config option
* <i>auth_backend_simple_cookie_id</i>, which defaults to 1

0 comments on commit 0479c12

Please sign in to comment.
You can’t perform that action at this time.