Log in

View Full Version : Your submission could not be processed because a security token was missing.


orange peel
12-24-2009, 01:46 AM
Got that error when I try to use the search function on my forums: forum.theclubpenguincheats.com
I Manually editted a ton of the template code so I dont want to "revert it to default' or anything like that.
Help what do I do?

Lynne
12-24-2009, 02:30 AM
Since you don't want to revert templates, here is a thread about how to add the correct code to your forms - Implementing CSRF Protection in modifications (https://vborg.vbsupport.ru/showthread.php?t=177013)

orange peel
12-24-2009, 03:06 PM
Hi that thread is too confusing as the person is not being beginner friendly and just saying "thould be added to the top of the file under the define for THIS_SCRIPT." and all this other stuff.
Where is THIS_SCRIPT!?

Lynne
12-24-2009, 04:44 PM
THIS_SCRIPT is defined at the top of any vbulletin page that renders text. It's one of the first lines in the page - look at index.php or forumdisplay.php or showthread.php etc.

orange peel
12-24-2009, 08:43 PM
OK but what files do I add that code to and where? And do I have to do the stuff with Template Changes if it's only the search button thats broken when I hit search?
Do I do the stuff for Exempting Certain Actions? And do I do the stuff Dismounted said "add the security token to AJAX requests using POST"?

Now do you see why Im confused? It's pretty much an overload to just link to something like that and assume a noob like me knows what to do.

Lynne
12-24-2009, 10:42 PM
You add the code to the forms being used when you are getting the error. In your case, if it's the search form, make sure it is in the search form. As for the ajax requests, if your search form uses ajax, then yeah, you may have to add it there.

Seriously, the easiest way to find/solve this problem is through reverting templates or comparing them to the default one.