From cf3180f6b8c552bbf7214d1ba72fbf1fc90ef861 Mon Sep 17 00:00:00 2001 From: nicosomb Date: Mon, 15 Apr 2013 14:09:58 +0200 Subject: =?UTF-8?q?v=C3=A9rificatio=20CSRF=20et=20mise=20en=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/config.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'inc/config.php') diff --git a/inc/config.php b/inc/config.php index 29a22507..84b86998 100644 --- a/inc/config.php +++ b/inc/config.php @@ -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 -- cgit v1.2.3