PDA

View Full Version : what is security token ?


sulasno
08-26-2010, 01:38 AM
received a message from one of my users;

"recieved an error message indicating a security token is missing when I tried to edit a blog."

what is a security token ?

mmoore5553
08-26-2010, 02:45 AM
Just means the basically it is not passing the security token for that session. If you just do a search for security token you will find the solution.

sulasno
08-26-2010, 03:36 AM
thanks

I did a search on "security token" before posting

after your response, I did another search and found some solutions hidden :-)

guess one of my styles is the culprit

betts02
08-26-2010, 09:38 AM
Maybe share the info with others ?

A link to where you founf the solution ?

Videx
08-27-2010, 01:33 AM
Ya, I can't edit my CMS home page now because a token is missing. I can edit other pages, and my co-admin can edit it. Ridiculous.

mmoore5553
08-27-2010, 01:51 AM
hahha

the fix usually is finding the line and what you clicked on in the address bar tells you where

just adding this piece to the code usually fixes it.. this is not all the code but it is the code that is missing

&markreadhash={vb:raw bbuserinfo.securitytoken}

the usual line is this

<input type="hidden" name="s" value="$session[sessionhash]" />

so usually finished like this

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

might be different in vb 4 but usually along these lines ..you can always look in default template . Someone please correct me if wrong in vb 4. .not near my pc

Videx
08-27-2010, 01:58 AM
We cannot edit the vb4 code to fix this. That 'fix' is worse than the problem.

mmoore5553
08-27-2010, 02:03 AM
How so ? I have fixed alot of security token errors with skins and just vb 4 in general adding the correct lines. But you have to go into the templates and add the code.

Videx
08-27-2010, 02:10 AM
If you're trying to say vb has coded the templates improperly, then you should open a ticket. Give us the url so we can all vote it up. Or at the very least give us a specific fix when you're near your pc.

mmoore5553
08-27-2010, 02:54 AM
Okay this is specific fix for recent vb 4 forum where mark read was giving that error. user was clicking mark read forum and it gave error. First thing i did was look at address bar to see what is said ..that usually gives good indicator. Then i went and look in the appropriate template

this was for mark read in the forumhome template.


original code:
<a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread" rel="nofollow">{vb:rawphrase mark_forums_read}</a>

fixed ..notice in red
<a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:ra w bbuserinfo.securitytoken}" rel="nofollow">{vb:rawphrase mark_forums_read}</a>

Usually you can revert templates to default and that works fine but then if you are using a custom skin the coded is all wrong . So if not on default skin it is always easy to just add the appropriate code. Also always log out and back in to test. Sometimes you have to clear internet cache also but not always.

this is just one example but they other security tokens are solved the same way .

COOLORANGEFREEZ
11-07-2015, 05:01 AM
Thanks for this tip. I was getting the Security Token Error upon logging in as Admin all of a sudden. I deleted a style that I wasn't using to be on the safe side and I changed the code in my footer accordingly. It appears to work as I don't get the error anymore.

My version = 3.8.3

hahha

the fix usually is finding the line and what you clicked on in the address bar tells you where


just adding this piece to the code usually fixes it.. this is not all the code but it is the code that is missing

&markreadhash={vb:raw bbuserinfo.securitytoken}

the usual line is this

<input type="hidden" name="s" value="$session[sessionhash]" />


so usually finished like this

<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

might be different in vb 4 but usually along these lines ..you can always look in default template . Someone please correct me if wrong in vb 4. .not near my pc