invalid form security token error after completing new user registration

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Posts: 5
Joined: Oct 09, 2018 10:01 am

invalid form security token error after completing new user registration

Post by nerdtron » Oct 13, 2018 10:01 am

When a new user registers an account on our MantisBT installation, they get the activation Email, click it and fill in the real name and password and then click "Update User". After doing this they are always presented with this error.
Invalid form security token. This could be caused by a session timeout, or accidentally submitting the form twice.
I just reproduced this again myself and can confirm that timeout wouldn't be an issue, I got the Email, clicked the link, quickly typed in the info and clicked Update User. I also made sure that I wasn't doing it twice.

I found the below, which just suggests updating to the latest version, however our version is much newer than what was reported there.

The below link refers you to the admin manual.

The admin manual refers to a PHP setting, gc_maxlifetime which it says defaults to 24 mins. That's way above the timeframe involved in my testing. As I said I'm clicking the link immediately when receiving it, spending a few seconds or so typing in the field values and then clicking Update User.

It also mentions the possibility of turning $g_form_security_validation off but then mentions that this would be a security risk.

I checked the related PHP settings. So it is the default of 24 mins which should be way higher than needed for what I experienced in my test.
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
Has anyone conquered this one? :)

Apache 2.6.32
MySQL 5.6.39
PHP 5.6.36
MantisBT 2.17.1

Post Reply