Hash code improved
authorRoland Häder <roland@mxchange.org>
Sat, 27 Sep 2008 18:27:02 +0000 (18:27 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 27 Sep 2008 18:27:02 +0000 (18:27 +0000)
inc/databases.php
inc/modules/guest/what-register.php

index 16d8b8c..3af8289 100644 (file)
@@ -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);
index b020a6d..1acda59 100644 (file)
@@ -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 = "";