matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.92k stars 2.66k forks source link

[Enhancement] Improve this error message by appending two checks: form security failed because of a token mismatch #22784

Open atom-box opened 1 day ago

atom-box commented 1 day ago

When this error occurs in the client browser: The form security failed because of a token mismatch. Please reload the form and check that your cookies are on Part of the error message could the following:

  1. In the browser, check whether cookies are on. Just run this and modify the error message:
if (navigator.cookieEnabled) {
    console.log("Cookies are enabled.");
} else {
    console.log("Cookies are disabled.");
}
  1. In the backend send a check for SSL (a cause of this error). The logic already exists: it is part of Matomo's System Check, in the Admin >> Diagnostics

This is a high frustration error for users as it keeps them logged out of their Matomo. Recently a team of 5 users, staring down a promised deadline, were all locked out for 5 days and 5 emails because of this error.

MatomoForumNotifications commented 1 day ago

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/cant-log-into-matomo/52251/5