From 6229b82a43e808d4ead53f841f9cbed3e7393366 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Mon, 27 Aug 2012 15:19:05 +1000 Subject: CSRF protection --- inc/mod/auth.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'inc/mod/auth.php') diff --git a/inc/mod/auth.php b/inc/mod/auth.php index d200c23f..6e2d3d1e 100644 --- a/inc/mod/auth.php +++ b/inc/mod/auth.php @@ -150,3 +150,9 @@ function create_pm_header() { return $header; } +function make_secure_link_token($uri) { + global $mod, $config; + return substr(sha1($config['cookies']['salt'] . '-' . $uri . '-' . $mod['id']), 0, 8); +} + + -- cgit v1.3