Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Wrong activation key being given out?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 January 2005 :  14:01:45  Show Profile  Visit MarkJH's Homepage
I keep getting emails from pending members who have been sent the activation key in their email but when they click on the link, it says that they have already registered but to a different username.

Odd thing is, it doesn't happen all of the time, but it's a problem enough since I get at least one of these emails a day. I have to delete the pending account and get them to re-register.

Why on earth would this be occuring?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 09 January 2005 :  14:03:28  Show Profile  Visit D3mon's Homepage
how many characters is in the activation key?


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 January 2005 :  14:04:22  Show Profile  Visit MarkJH's Homepage
16. Could it be a Friendly Registration Mod error?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

Edited by - MarkJH on 09 January 2005 14:05:29
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 09 January 2005 :  14:05:40  Show Profile  Visit D3mon's Homepage
Did you use my Friendly Registration mod by chance?


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 January 2005 :  14:09:37  Show Profile  Visit MarkJH's Homepage
Yes. I'd forgotten I'd added this Mod, to be honest. Is this something that has been reported before, then?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

Edited by - MarkJH on 09 January 2005 14:10:16
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 09 January 2005 :  16:51:34  Show Profile  Visit D3mon's Homepage
Not reported, but I found it my own forums. It seems when the code randomises to create a 16 digit number, the likelyhood of a repeat number is quite high!

Check the mod again for the instructions to up the character count to 32 which should eliminate this completely.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 09 January 2005 :  19:49:26  Show Profile  Visit MarkJH's Homepage
Really? Even with only 16 digits the likelyhood of a repeat should be somewhat minimal. How about using a different randomiser routine?

I'll up the char. count to 32.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

Edited by - MarkJH on 09 January 2005 20:01:33
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 10 January 2005 :  04:12:22  Show Profile  Visit D3mon's Homepage
Yeah, I was as surprised as you!


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 10 January 2005 :  05:34:49  Show Profile
Strange; I have it set to 10 characters at the moment to make it as easy as possible for new members and haven't had any complaints so far. Of course, no complaints doesn't mean it's not happening, just that its' not being reported.

Perhaps, to get around it, you could add a check before sending out the activation key to see if it already exists in the members_pending table and keep generating a new one until it's unique. Or, if more than one record is found in the database for any given key when a member activates their account, have them enter their e-mail address or username.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 10 January 2005 :  12:19:54  Show Profile  Visit MarkJH's Homepage
I never have any more than 40 pending members, so the likelihood of getting two identical random patterns nearly every day should surely be microscopic! Even with only two characters there should be a *does a quick, probably incorrect calculation* 1 in 1300 chance of a second pattern being the same as the first. With even only 16 characters, the chances of repeating patterns is minute.

Haven't had any complaints today since I upped it to 32 but I do wonder if this is actually the problem.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 10 January 2005 :  13:49:27  Show Profile  Visit D3mon's Homepage
Thing is, this mod actually stores their original activation number in the main members table when they activate it, so that if they try to activate it again, it can tell them that they've already done it. Once you get a few members under your belt, the likelyhood of repeats increases. It never reached a proper release (still only beta) so I guess I hadn't though that far ahead.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 10 January 2005 :  18:50:50  Show Profile  Visit MarkJH's Homepage
But - and I'm unless I'm getting my maths wrong - if you have 16 characters, all of which can be one of 36 different possibilities, you get 8 septillion or 8,000,000,000,000,000,000,000,000 (thankyou Google calculator!) combinations, which is an enormous number. Even with 10,000 members, the chances of frequent repeats are as good as zero.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 10 January 2005 :  22:44:07  Show Profile
Can I let you on a little secret? We actually had that problem at the Snitz Forums here, where we had run into a ducplicate activation key, so we increased the key. It didn't happen often, but a few times to actually increase the key.

Maybe the key isn't so random after all.

Support Snitz Forums
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 11 January 2005 :  02:46:45  Show Profile  Visit MarkJH's Homepage
quote:
Maybe the key isn't so random after all.
That's my guess, too.

Browsing through ASP101, it would seem that that's the standard way of creating a random number.

Could the key array contain capital A-Z too? Adding those extra 26 characters may allow for a shorter key that's a bit more random.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 11 January 2005 :  05:48:48  Show Profile
That's what I've done on Woo.ie - you just have to make sure you use strComp after you've pulled the activation key from the database.

This is what my GetKey() function looks like (with a couple of lines removed where I rewrote some things):
function GetKey()
	dim key(10),intNumChars,keyArray
	intNumChars=72
	keyArray=array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9","0","1","2","3","4","5","6","7","8","9")
	randomize
	for i=0 to 9
		key(i)=int(((intNumChars-1)*rnd)+1)
	next
	for j=0 to 9
		GetKey=GetKey&keyArray(key(j))
	next
end function
And these are the checks I perform when someone activates an account (where strWooKey is passed through the querystring):
if len(strWooKey)<>10 then
'	Invalid key error
else
'	Get record from MEMBERS_PENDING
	if not (rs.bof or rs.eof) then
		if strComp(strWooKey,rs("M_KEY"))<>0 then
'			Case sensitivity error
		else
'			Move from MEMBERS_PENDING to MEMBERS
		end if
	else
'		Get record from MEMBERS
		if not (rs2.bof or rs2.eof) then
			if strComp(strWooKey,rs("M_KEY"))=0 then
'				Account already activated error
			else
'				Key not found error
			end if
		else
'			Key not found error
		end if
	end if
end if

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07