Log in

View Full Version : "security token was missing"


dukegotgame
05-10-2009, 02:02 PM
I have two problems that I suspect are connected and I'm not sure what I did or what to do.


I have members contacting me via email saying they are getting "Security Token Missing" when they are attempting to login.
I am also not seeing an new registers so I tested it and after I accept the rules and hit register, I get "You have left a required field blank". Although the only field is to check the accept rules box.



Does anyone have any ideas? :confused:

--------------- Added 1241969778 at 1241969778 ---------------

I am now 99% sure that I have messed this one up myself in a template edit. I have switched to another style, and tried to register an account and had no problem.

So what template should I be looking at that has to do with registering?

Lynne
05-10-2009, 02:40 PM
Look at any templates that are used on the registration page (vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of all the templates for that page in the source code).

dukegotgame
05-10-2009, 03:49 PM
Here's another strange update. Everything is fine in my old style, but in my new and the default vb styles, I can not register an account.

I looked at the register.php page source here's one notable difference I see, but I do not know if it even matters::


The style I can register with:

<form action="register.php?do=register" method="post">
<input type="hidden" name="s" value="" />
<input type="hidden" name="securitytoken" value="guest" />
<input type="hidden" name="do" value="register" />
<input type="hidden" name="url" value="http://www.MYSITE.com/forum/" />
<input type="hidden" name="month" value="" />
<input type="hidden" name="day" value="" />
<input type="hidden" name="year" value="" />

<input type="hidden" name="ejtoMUft" value="gyDSerIj" />
<input type="hidden" name="WhjdFopQ" value="7865249rtbg25hdiv783dg8rujv5d4t" />

<input type="hidden" name="who" value="adult" />



The style I can not register with:

<form action="register.php?do=register" method="post">
<input type="hidden" name="s" value="" />
<input type="hidden" name="securitytoken" value="guest" />
<input type="hidden" name="do" value="register" />
<input type="hidden" name="url" value="http://www.MYSITE.com/forum/" />
<input type="hidden" name="month" value="" />
<input type="hidden" name="day" value="" />
<input type="hidden" name="year" value="" />

<input type="hidden" name="who" value="adult" />






I notice this:


<input type="hidden" name="ejtoMUft" value="gyDSerIj" />
<input type="hidden" name="WhjdFopQ" value="7865249rtbg25hdiv783dg8rujv5d4t" />


Is missing from the one I can not register. Is this something to do with the Spam bot prevention from registering?

--------------- Added 1241974473 at 1241974473 ---------------

Look at any templates that are used on the registration page (vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of all the templates for that page in the source code).



MANY THANKS!!!!

Getting me to look into my source code fixed this for me. Thank you. It was the spam bot prevention. I hadn't edited the template on the new style for that. I'm not sure about the security token issue yet, but I'm pretty sure they were related.

Lynne
05-10-2009, 04:04 PM
Look at the Spam Bot modification and see if they asked you to add those lines to the form.

dukegotgame
05-15-2009, 07:46 PM
Well that fixed the registration problem. But I am still getting hit with a ton of contact emails stating that they have signed up but when they go to login they are gotting the message:

"Security Token Missing"

Any ideas?

Lynne
05-15-2009, 08:07 PM
Read this - Implementing CSRF Protection in modifications (https://vborg.vbsupport.ru/showthread.php?t=177013)

dukegotgame
05-18-2009, 01:04 AM
I think I have the problem diagnosed. Now the question is, can anyone help me out.


There are times when users login, they are automatically re-directed to ttp://www.mywebsite.com/forum/profile.php?do=dst


I do not know why the re-direct happens. This doesn't happen when I log in, but I have replicated it with another account. Here is the vbulletin error that you get after the redirection:

http://www.themaddenlab.com/34h567gv8fcd9x5krjfc/zxcvb65tfg9ikjm2wedmckdfr8/Untitled.jpg



If you hit back on the browser after this message, everything is fine. :confused:


Any help is appreciated!

Lynne
05-18-2009, 01:57 AM
Check your footer template and make sure it has the security token in the form as mentioned in the article I linked you to.

dukegotgame
05-18-2009, 02:23 AM
Check your footer template and make sure it has the security token in the form as mentioned in the article I linked you to.


Lynne,

I have to say thanks again. I don't know why you take it upon yourself to answer everyone's questions to the best of your ability, but it's great you are here.

That fixed the problem I was able to emulate and hopefully the problem altogether. How did you know it had to be the footer? Was DST Daylight Savings Time?

Lynne
05-18-2009, 02:43 AM
I've seen a LOT of problems posted here and after a while you learn what the answers are to some of problems. :)