Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION CSRF detected!
#7
Most of that is wrong, this is GSs csrf detection, it has nothing to do with an actual csrf or server or browser interception.
It simply means that the nonce we sent on the page has expired or no longer matches the one we generate, a nonce is not really a nonce in GS since we use stateless sessions, but is calculated based on some predictable stuff. ( a nonce is a use once token, to prevent action replays or hijacks, ours is not really a nonce but a nonce good for 1-2 hours )

$hash=sha1($action.$file.$uid.$USR.$SALT.$time);

If your http user agent changes during it breaks, if your php_self is calculated wrong it breaks, if it expires 1-2 hours, it breaks.


I have an issue to deal with this in a somewhat better manner to at least not lose data.
https://github.com/GetSimpleCMS/GetSimpl...ssues/1014

and there are also some fixes in 3.4 such as settable timeouts etc.

Browsers are good at preserving textareas, but ckeditor and other js stuff is sometimes lost

It might be easier to just turn this off if you encounter it or are rapidly developing or are local and do not care, or have enhanced ip restrictions in apache for example.

in gsconfig.php

# Turn off CSRF protection. Uncomment this if you keep receiving the error message "CSRF error detected..."
#define('GSNOCSRF', TRUE);
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
CSRF detected! - by Charpy1 - 2016-02-23, 18:38:27
RE: CSRF detected! - by Bigin - 2016-02-23, 19:03:48
RE: CSRF detected! - by shawn_a - 2016-02-23, 23:05:45
RE: CSRF detected! - by jwzumwalt - 2016-02-24, 01:57:14
RE: CSRF detected! - by Bigin - 2016-02-24, 02:12:59
RE: CSRF detected! - by jwzumwalt - 2016-02-24, 03:06:28
RE: CSRF detected! - by shawn_a - 2016-02-24, 03:15:32
RE: CSRF detected! - by jwzumwalt - 2016-02-24, 04:02:48
RE: CSRF detected! - by jwzumwalt - 2016-03-24, 13:37:13
RE: CSRF detected! - by Charpy1 - 2016-02-24, 06:58:16
RE: CSRF detected! - by Bigin - 2016-02-24, 07:19:22
RE: CSRF detected! - by jwzumwalt - 2016-02-24, 09:15:54
RE: CSRF detected! - by shawn_a - 2016-02-24, 07:33:29
RE: CSRF detected! - by Bigin - 2016-02-24, 17:18:20
RE: CSRF detected! - by shawn_a - 2016-02-25, 00:13:36



Users browsing this thread: 5 Guest(s)