From: Roland Häder Date: Sat, 27 Sep 2008 18:27:02 +0000 (+0000) Subject: Hash code improved X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9c43d32f44e71d7daa612b5b03324cc183e5dc27;p=mailer.git Hash code improved --- 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 = "";