forked from wallabag/wallabag
fix bug #127: update session class
This commit is contained in:
@ -93,6 +93,7 @@ class Poche
|
||||
private function init()
|
||||
{
|
||||
Tools::initPhp();
|
||||
Session::$sessionName = 'poche';
|
||||
Session::init();
|
||||
|
||||
if (isset($_SESSION['poche_user']) && $_SESSION['poche_user'] != array()) {
|
||||
|
||||
@ -48,4 +48,12 @@ if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timez
|
||||
date_default_timezone_set('UTC');
|
||||
}
|
||||
|
||||
$poche = new Poche();
|
||||
$poche = new Poche();
|
||||
|
||||
#XSRF protection with token
|
||||
if (!empty($_POST)) {
|
||||
if (!Session::isToken($_POST['token'])) {
|
||||
die(_('Wrong token'));
|
||||
}
|
||||
unset($_SESSION['tokens']);
|
||||
}
|
||||
Reference in New Issue
Block a user