aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-09-17 14:48:16 +0200
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-09-17 14:48:16 +0200
commitf6597c7cb90e9bfa96f01f5f78f98cd72696da55 (patch)
tree78a3ad1edb1bd55bedee847455831404d99ad93b /inc/poche
parenta8778dc23e60e65b47e2aae5d4cdf92660ee4c02 (diff)
downloadwallabag-f6597c7cb90e9bfa96f01f5f78f98cd72696da55.tar.gz
wallabag-f6597c7cb90e9bfa96f01f5f78f98cd72696da55.tar.zst
wallabag-f6597c7cb90e9bfa96f01f5f78f98cd72696da55.zip
fix bug #127: update session class
Diffstat (limited to 'inc/poche')
-rw-r--r--inc/poche/Poche.class.php1
-rwxr-xr-xinc/poche/config.inc.php10
2 files changed, 10 insertions, 1 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index 9db4a034..2f0f7038 100644
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -93,6 +93,7 @@ class Poche
93 private function init() 93 private function init()
94 { 94 {
95 Tools::initPhp(); 95 Tools::initPhp();
96 Session::$sessionName = 'poche';
96 Session::init(); 97 Session::init();
97 98
98 if (isset($_SESSION['poche_user']) && $_SESSION['poche_user'] != array()) { 99 if (isset($_SESSION['poche_user']) && $_SESSION['poche_user'] != array()) {
diff --git a/inc/poche/config.inc.php b/inc/poche/config.inc.php
index aaa26af8..9247c292 100755
--- a/inc/poche/config.inc.php
+++ b/inc/poche/config.inc.php
@@ -48,4 +48,12 @@ if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timez
48 date_default_timezone_set('UTC'); 48 date_default_timezone_set('UTC');
49} 49}
50 50
51$poche = new Poche(); \ No newline at end of file 51$poche = new Poche();
52
53#XSRF protection with token
54if (!empty($_POST)) {
55 if (!Session::isToken($_POST['token'])) {
56 die(_('Wrong token'));
57 }
58 unset($_SESSION['tokens']);
59} \ No newline at end of file