]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into 1512-ostatus-comment
authorMichael Vogel <icarus@dabo.de>
Tue, 22 Dec 2015 10:25:37 +0000 (11:25 +0100)
committerMichael Vogel <icarus@dabo.de>
Tue, 22 Dec 2015 10:25:37 +0000 (11:25 +0100)
Conflicts:
include/ostatus.php

1  2 
boot.php
include/auth.php
include/delivery.php
include/ostatus.php
include/session.php

diff --cc boot.php
Simple merge
index 4c695cc1e3be345320a41debea00297b49cae016,4c695cc1e3be345320a41debea00297b49cae016..385f9f0cee2ee283fc14cefd0ea546031f10ad0a
@@@ -5,6 -5,6 +5,8 @@@ require_once('include/security.php')
  require_once('include/datetime.php');
  
  function nuke_session() {
++      session_unset();
++/*
        new_cookie(0); // make sure cookie is deleted on browser close, as a security measure
  
        unset($_SESSION['authenticated']);
        unset($_SESSION['my_address']);
        unset($_SESSION['addr']);
        unset($_SESSION['return_url']);
++*/
  }
  
  
--// login/logout 
++// login/logout
  
  
  
@@@ -31,7 -31,7 +34,7 @@@
  if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-params'))) || ($_POST['auth-params'] !== 'login'))) {
  
        if(((x($_POST,'auth-params')) && ($_POST['auth-params'] === 'logout')) || ($a->module === 'logout')) {
--      
++
                // process logout request
                call_hooks("logging_out");
                nuke_session();
@@@ -203,9 -203,9 +206,14 @@@ else 
  }
  
  function new_cookie($time) {
++      $a = get_app();
++
        $old_sid = session_id();
--      session_set_cookie_params("$time");
++      session_set_cookie_params($time);
++      //session_set_cookie_params($time, "/", $a->get_hostname());
        session_regenerate_id(false);
  
        q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid));
++
++      logger("Session parameter lifetime: ".$time." - got: ".print_r(session_get_cookie_params(), true), LOGGER_DEBUG);
  }
Simple merge
Simple merge
index dda84e77a8373f82ad2fd3dbbd738b01db384d84,6632b7e89a06be014a37dd953eaa51b70eddedae..11641d6cea7d2fd056b45167be42bdae2b07cb2c
@@@ -79,7 -72,7 +79,7 @@@ ini_set('session.gc_probability', $gc_p
  ini_set('session.use_only_cookies', 1);
  ini_set('session.cookie_httponly', 1);
  
--
--session_set_save_handler ('ref_session_open', 'ref_session_close',
-                       'ref_session_read', 'ref_session_write',
-                       'ref_session_destroy', 'ref_session_gc');
 -                            'ref_session_read', 'ref_session_write',
 -                            'ref_session_destroy', 'ref_session_gc');
++if (!get_config('system', 'disable_database_session'))
++      session_set_save_handler('ref_session_open', 'ref_session_close',
++                              'ref_session_read', 'ref_session_write',
++                              'ref_session_destroy', 'ref_session_gc');