From 9c43d32f44e71d7daa612b5b03324cc183e5dc27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 27 Sep 2008 18:27:02 +0000 Subject: [PATCH] Hash code improved --- inc/databases.php | 2 +- inc/modules/guest/what-register.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index 16d8b8cdaf..3af828913a 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "399"); +define('CURR_SVN_REVISION', "400"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index b020a6d4e2..1acda59251 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -180,8 +180,11 @@ if ((isset($_POST['ok'])) && (!$FAILED)) if (strlen($_POST['day']) == 1) $_POST['day'] = "0".$_POST['day']; if (strlen($_POST['month']) == 1) $_POST['month'] = "0".$_POST['month']; + // Get total users + $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); + // Hash = MM-DD-YYYY:IP:USER_AGENT:TIMEMARK - $hash = generateHash($_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".getenv('REMOTE_ADDR').":".getenv('HTTP_USER_AGENT').":".time()); + $hash = generateHash(sha1($totalUsers.":".$_POST['month']."-".$_POST['day']."-".$_POST['year'].":".getenv('SERVER_NAME').":".getenv('REMOTE_ADDR').":".getenv('HTTP_USER_AGENT')."-".time())."/".RAND_NUMBER); // Add design when extension sql_patches is v0.2.7 or greater $ADD1 = ""; $ADD2 = ""; -- 2.39.5