Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF token error message and PHP SessionHandler Warnings #7106

Closed
afonseca08 opened this issue Jan 5, 2019 · 19 comments
Closed

CSRF token error message and PHP SessionHandler Warnings #7106

afonseca08 opened this issue Jan 5, 2019 · 19 comments
Labels
bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test
Milestone

Comments

@afonseca08
Copy link

afonseca08 commented Jan 5, 2019

Bug Description

I am getting the following error message displayed in the Mautic UI:
"CSRF token error. Try to refresh the page and try again."
screenshot 2019-01-05 11 49 34

It happens when I've had the Mautic window open for several hours or overnight and then return to it. It looks like I remain signed into Mautic but the error displays until I refresh the browser. Upon refreshing it continues to work normally. Note: I have selected for Mautic to remember me so I don't have to sign in again.

Q A
Mautic version 2.15.0
PHP version 7.1.25
Browser Chrome Version 71.0.3578.98 (Official Build) (64-bit), Safari version 12.0.2 (14606.3.4)

Steps to reproduce

  1. Sign into Mautic, choose to stay signed in.
  2. Have any Mautic page open, and leave it open for several hours or overnight.
  3. Observe the error message appears in the UI.
  4. Refresh the browser and observe error message goes away.
  5. Can reproduce again by going to step 2.

Log errors

From mautic/app/logs:
[2019-01-04 17:23:49] mautic.WARNING: PHP Warning - SessionHandler::read(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' - in file /home/afonseca/public_html/mautic/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php - at line 62 [] []
[2019-01-04 17:23:50] mautic.WARNING: PHP Warning - SessionHandler::write(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' - in file /home/afonseca/public_html/mautic/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php - at line 70 [] []
[2019-01-04 17:23:50] mautic.WARNING: PHP Warning - session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/cpanel/php/sessions/ea-php71) - in file /home/afonseca/public_html/mautic/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php - at line 241 [] []

@onlineexpert
Copy link

I have the exact same findings in Chrome 70.0.3538.110 for quite some time and assumed it is a Chrome specific issue.

@dsp76
Copy link

dsp76 commented Jan 6, 2019

I have the exact same findings in Chrome 70.0.3538.110 for quite some time and assumed it is a Chrome specific issue.

Did it not happen with other browsers?

@onlineexpert
Copy link

I cannot confirm that it does or does not happen with other browsers since I occasionally use Firefox and Safari but never when working with Mautic.

@afonseca08
Copy link
Author

I can confirm it also repros on Safari version 12.0.2 (14606.3.4).

@escopecz escopecz added the bug Issues or PR's relating to bugs label Jan 21, 2019
@ced-mohitp
Copy link

Any update on this, as I'm getting this since I've updated my mautic to version 2.15.0

@ManasN
Copy link

ManasN commented Aug 10, 2019

I get this issue on firefox too, using ubu 16

@incentfit
Copy link

I get it too. Mautic version 2.15.2 running on nginx on ubuntu 18.

@pety-dc
Copy link
Contributor

pety-dc commented Sep 6, 2019

We experienced the same.
I look into how mautic tries to keep the session alive.
There is an idletimer that tracks when the mautic user goes idle, goes away and comes back.
But it doesn't ping the server while you are away
If you remain away for longer than the session is alive, the server kicks you out.

@npracht
Copy link
Member

npracht commented Oct 4, 2019

@afonseca08 @ManasN @online-expert @dsp76 @ced-mohitp can you test #7883 ?

@npracht npracht added the ready-to-test PR's that are ready to test label Oct 4, 2019
@PierreAmmeloot
Copy link
Contributor

It's OK for me.

@PierreAmmeloot
Copy link
Contributor

@escopecz when you can merge bux fix directly on master branch?

@afonseca08
Copy link
Author

@npracht, I verified the fix using MautiBox. I did not see the error message appear.

@escopecz
Copy link
Member

A release leader can merge PRs. There is no release leader for the next Mautic 2.x version yet.

@PierreAmmeloot
Copy link
Contributor

@escopecz who can designate a leader for the next release?

@escopecz
Copy link
Member

That's not the right question to ask. A better question is:

Who wants to step up to be a release leader?

A release leader can be anyone who has a history of code contributions into Mautic.

@PierreAmmeloot
Copy link
Contributor

What exactly is the role of a release leader? If you wish I can surely help. :-)

@escopecz
Copy link
Member

A release leader is responsible for 1 release. She/he must ensure that all merged PRs are tested properly so there must be some activity in the community to help test some PRs. Also, no bad (vulnerable, slow, hard-to-maintain, ...) code should not be merged. Then there must be a beta release and a production release. A release leader must have a write permission to the mautic/mautic repository. DB Hurley can grant such permission based on the past contributions.

@PierreAmmeloot
Copy link
Contributor

@escopecz I can do this if you want. What's your opinion, @dbhurley do you agree?

@npracht npracht added this to the 2.16.0 milestone Jan 29, 2020
@dennisameling
Copy link
Member

#7883 has been merged now for the 2.16 release, so I'm closing this issue. Thanks for providing the PR @pety-dc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test
Projects
None yet
Development

No branches or pull requests