postal icon indicating copy to clipboard operation
postal copied to clipboard

CSRF token mismatch

Open ember-ana opened this issue 6 years ago • 7 comments

Hi, I've tried to setup a postal server from stable following the installation guide.

nginx config postal.yml

upon trying to create an org, I get this error: https://i.imgur.com/NvWj5mi.jpg

logs

I've setup postal before with the same setup, and there hasn't been a new release since then; am I overseeing something obvious?

ember-ana avatar Jan 05 '20 13:01 ember-ana

You could try using your browser developer tools to see if you're actually sending a CSRF token.

Also can you tell us which Ruby version you are using? There have been other issues where people weren't using Ruby 2.3 and had minor UI problems.

willpower232 avatar Jan 05 '20 15:01 willpower232

~ # ruby -v
ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-linux-gnu]

I've tested this across Firefox, Chrome, Iridium, and Chrome mobile. How do I check if a CSRF token is sent?

ember-ana avatar Jan 05 '20 16:01 ember-ana

Cookies set are
__cfduid, experimentation_subject_id, browser_id, cf_use_ob, user_session, _postal_session

Form data is

utf8: ✓
organization[name]: test
organization[permalink]: 
commit: Create organization

ember-ana avatar Jan 05 '20 21:01 ember-ana

The form data should include an authenticity token.

The cf cookies suggest you are using cloudflare to proxy the UI, are you able to turn this off?

willpower232 avatar Jan 07 '20 09:01 willpower232

I'll test without cf, though if it's incompatible with cf, that'd be quite inconvenient.

ember-ana avatar Jan 07 '20 20:01 ember-ana

Hey @willpower232, I've managed to get it to work by disabling Cloudflare; can you imagine why this issue would arise?

ember-ana avatar Jan 14 '20 18:01 ember-ana

I'm not super familiar with cloudflare but I know that it can do things to the content that get proxied through it so I'd imagine that some unwanted filtering is happening.

It might be possible for you to contact their support about it as it could be as simple as a setting that needs changing in your control panel.

willpower232 avatar Jan 15 '20 14:01 willpower232