]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/config.php
vérificatio CSRF et mise en page
[github/wallabag/wallabag.git] / inc / config.php
index 29a22507c32067bb20ec75354915c6d6744a491c..84b86998de69754dfb8b70a7ee10cb5fb2f4b0ee 100644 (file)
@@ -22,4 +22,12 @@ raintpl::$cache_dir = './cache/';
 raintpl::$base_url  = get_poche_url();
 raintpl::configure('path_replace', false);
 raintpl::configure('debug', false);
-$tpl = new raintpl();
\ No newline at end of file
+$tpl = new raintpl();
+
+session_start();
+
+if (!isset($_SESSION['token_poche'])) {
+    $token = md5(uniqid(rand(), TRUE));
+    $_SESSION['token_poche'] = $token;
+    $_SESSION['token_time_poche'] = time();
+}
\ No newline at end of file