diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-05 22:50:00 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@gmail.com> | 2013-08-05 22:50:00 +0200 |
commit | 6fb3a2a18591a4c79e91a90282d88cd84554f83c (patch) | |
tree | fbd769678cd67f39ac40d40da7fef34aee2ce678 | |
parent | d28a7ca30fa50845a54b0e21844b20b373b7fd44 (diff) | |
download | wallabag-6fb3a2a18591a4c79e91a90282d88cd84554f83c.tar.gz wallabag-6fb3a2a18591a4c79e91a90282d88cd84554f83c.tar.zst wallabag-6fb3a2a18591a4c79e91a90282d88cd84554f83c.zip |
move xsrf test
-rw-r--r-- | inc/poche/config.inc.php | 12 | ||||
-rw-r--r-- | index.php | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/inc/poche/config.inc.php b/inc/poche/config.inc.php index d91a44be..ee0f6616 100644 --- a/inc/poche/config.inc.php +++ b/inc/poche/config.inc.php | |||
@@ -29,7 +29,6 @@ $storage_type = 'sqlite'; # sqlite, mysql, (file, not yet) | |||
29 | # /!\ Be careful if you change the lines below /!\ | 29 | # /!\ Be careful if you change the lines below /!\ |
30 | require_once './inc/poche/Tools.class.php'; | 30 | require_once './inc/poche/Tools.class.php'; |
31 | require_once './inc/poche/Url.class.php'; | 31 | require_once './inc/poche/Url.class.php'; |
32 | require_once './inc/3rdparty/Session.class.php'; | ||
33 | require_once './inc/3rdparty/class.messages.php'; | 32 | require_once './inc/3rdparty/class.messages.php'; |
34 | require_once './inc/poche/Poche.class.php'; | 33 | require_once './inc/poche/Poche.class.php'; |
35 | require_once './inc/3rdparty/Readability.php'; | 34 | require_once './inc/3rdparty/Readability.php'; |
@@ -39,9 +38,18 @@ require_once './inc/store/' . $storage_type . '.class.php'; | |||
39 | require_once './vendor/autoload.php'; | 38 | require_once './vendor/autoload.php'; |
40 | require_once './inc/3rdparty/simple_html_dom.php'; | 39 | require_once './inc/3rdparty/simple_html_dom.php'; |
41 | require_once './inc/3rdparty/paginator.php'; | 40 | require_once './inc/3rdparty/paginator.php'; |
41 | require_once './inc/3rdparty/Session.class.php'; | ||
42 | 42 | ||
43 | if (DOWNLOAD_PICTURES) { | 43 | if (DOWNLOAD_PICTURES) { |
44 | require_once './inc/poche/pochePictures.php'; | 44 | require_once './inc/poche/pochePictures.php'; |
45 | } | 45 | } |
46 | 46 | ||
47 | $poche = new Poche($storage_type); \ No newline at end of file | 47 | $poche = new Poche($storage_type); |
48 | |||
49 | #XSRF protection with token | ||
50 | // if (!empty($_POST)) { | ||
51 | // if (!Session::isToken($_POST['token'])) { | ||
52 | // die(_('Wrong token')); | ||
53 | // } | ||
54 | // unset($_SESSION['tokens']); | ||
55 | // } \ No newline at end of file | ||
@@ -10,14 +10,6 @@ | |||
10 | 10 | ||
11 | include dirname(__FILE__).'/inc/poche/config.inc.php'; | 11 | include dirname(__FILE__).'/inc/poche/config.inc.php'; |
12 | 12 | ||
13 | #XSRF protection with token | ||
14 | // if (!empty($_POST)) { | ||
15 | // if (!Session::isToken($_POST['token'])) { | ||
16 | // die(_('Wrong token')); | ||
17 | // } | ||
18 | // unset($_SESSION['tokens']); | ||
19 | // } | ||
20 | |||
21 | $referer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER']; | 13 | $referer = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER']; |
22 | $view = Tools::checkVar('view', 'home'); | 14 | $view = Tools::checkVar('view', 'home'); |
23 | $action = Tools::checkVar('action'); | 15 | $action = Tools::checkVar('action'); |