Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

[DeniedException] The CSRF token is missing or invalid for this POST request


We got this error message spamming our system logs (about one message every 3-4 seconds) . This makes logs completely unreadable :

Do you have an idea about the root cause of this issue ? Do you have any solution ?
If it is not a critical error (our TestRail seems working fine) do you know how we can just hide this error message ?

Thanks a lot for your help !

Hi Kiéran,

This just means that there are one or more users without a valid session but still have TestRail open. This can happen if the TestRail session has expired (e.g. the user logged out) but the user still has another browser tab open with TestRail. You can ignore CSRF error messages from the system log and these aren’t regular errors in the sense that there’s something wrong with your installation.

It wouldn’t be possible to disable this logging at this time, as it’s an accurate logging of the event and we don’t have specific flags to disable just a specific type of error. In general you would only need to review the logs if an actual error message is produced within the TestRail UI, and we’re also happy to help troubleshoot any issues if you’ve run into these.

Hope this helps,