CSRF issue only on first call

Ask for help about NoScript, no registration needed to post
ell
Posts: 1
Joined: Mon Apr 11, 2016 2:08 pm

CSRF issue only on first call

Post by ell »

Hello guys!

Recently we've posted our open source secure data exchange but faced an issue with NoScript plugin.

Application page: https://secu.su
Application API: https://api.secu.su

Domains are white-listed in plugin.

While user is creating new data container browser sending POST request to API - Cross Origin error is thrown. Data is sent but response is blocked (application will throw error popup).
If you'll try to send data again - it will be sent and response will be received without any problems.
All the future tries will be successful, until you restart the browser. First call will raise Cross Origin error again.

If you'll turn off the NoScript plugin - error will disappear, that's why I thought it's plugin issue.

// Tested with NoScript 2.9.0.11
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
barbaz
Senior Member
Posts: 11141
Joined: Sat Aug 03, 2013 5:45 pm

Re: CSRF issue only on first call

Post by barbaz »

When this issue occurs, do you see anything related in the Browser Console? (Ctrl-Shift-J)
(if you don't know what's related, turn off CSS warnings and post everything else you see)
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Thrawn
Master Bug Buster
Posts: 3106
Joined: Mon Jan 16, 2012 3:46 am
Location: Australia
Contact:

Re: CSRF issue only on first call

Post by Thrawn »

First up - are you sending raw Mustache code to the client mingled with your HTML, and having it parsed in JavaScript?! That's.........a different approach to what I've seen before.

Second, I can't get it working at all (buttons do nothing), probably due to this.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.

True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Post Reply