Revert "Api: Fix sharing lost session ID causing logout"

This reverts commit 07561bf01d.
This commit is contained in:
nathangray 2020-03-05 14:07:24 -07:00
parent 07561bf01d
commit 0df0777484

View File

@ -21,12 +21,10 @@
namespace EGroupware\Api;
use DateInterval;
use PragmaRX\Google2FA;
use EGroupware\Api\Mail\Credentials;
use EGroupware\OpenID;
use ErrorException;
use League\OAuth2\Server\Exception\OAuthServerException;
use PragmaRX\Google2FA;
/**
* Create, verifies or destroys an EGroupware session
@ -940,7 +938,7 @@ class Session
if ($ts)
{
$expiration = new DateTime('now', DateTime::$server_timezone);
$expiration->add(new DateInterval($lifetime));
$expiration->add(new \DateInterval($lifetime));
return $expiration->format('ts');
}
return $lifetime;
@ -1173,7 +1171,7 @@ class Session
* @var array
*/
static $pseudo_session_scripts = array(
'webdav.php', 'groupdav.php', 'remote.php'
'webdav.php', 'groupdav.php', 'remote.php', 'share.php'
);
/**
@ -1969,14 +1967,14 @@ class Session
* Initialise the used session handler
*
* @return boolean true if we have a session, false otherwise
* @throws ErrorException if there is no PHP session support
* @throws \ErrorException if there is no PHP session support
*/
public static function init_handler()
{
switch(session_status())
{
case PHP_SESSION_DISABLED:
throw new ErrorException('EGroupware requires PHP session extension!');
throw new \ErrorException('EGroupware requires PHP session extension!');
case PHP_SESSION_NONE:
if (headers_sent()) return false; // only gives warnings
ini_set('session.use_cookies',0); // disable the automatic use of cookies, as it uses the path / by default