MyBB Community Forums

Full Version: Registration Activation Code [Severe Issue]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having a real issue since upgrading to 1.4.12 with the changed files package. I need to know if this is just me or if anyone else with lots of daily registrations is experiencing this.

I've recieved numerous complaint about registration activation code problems today. I took a peek in the mybb_awaitingactivation table and about 1/2 the code column is empty. WTF.

So if anyone else can take a look at their table and see if they have this same issue I'd appreciate it. Or if staff knows about changes in code that might have effected this functionality. I may have to revert something.

btw even looking at memberlist here I see an out of the ordinary amount of "Awaiting Activation" accounts.
http://community.mybboard.net/memberlist...=20&page=1

Thank you.


EDIT: Upon 1.4.11 compare I see that this is a new function (inc/functions.php).

function my_rand($min=null, $max=null, $force_seed=false)
{
	static $seeded = false;
	static $obfuscator = 0;
	
	if($seeded == false || $force_seed == true)
	{
		mt_srand(secure_seed_rng());

		//  Just call it again here instead of saving extra bytes... 
		$obfuscator = secure_seed_rng();

		$seeded = true;
	}
	
	if($min !== null && $max !== null)
	{
		$val = mt_rand($min, $max) + $obfuscator;
		$val = $min + (($val - $min) % ($max+1-$min));
		return $val;
	}
	else
	{
		$val = mt_rand() + $obfuscator;
		$val %= mt_getrandmax() + 1;
		return $val;
	}
}

My guess is that something is very wrong with it. This needs to be immediately addressed.

EDIT 2: Appears that function calls a function secure_seed_rng() (inc/functions.php) which could also be the problem
There seems to be some issues with the changes. You're not the only one to have a blank random string. We're looking into it.
Good. This is very important. I've committed the changes here:
http://community.mybboard.net/thread-678...#pid489750

I'll see if those fix the issue.
I've only had one incident, but I don't have even close the number of daily registrations that you do.

I've check the table and there are now no missing codes, because I had to manually activate the single incident I had.

I am frankly a bit a surprised that these issues have made it to the final release.