Advertisement:

Author Topic: Invalid CSRF token ???  (Read 49904 times)

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Invalid CSRF token ???
« Reply #45 on: March 06, 2013, 05:17:11 pm »
Hi @kcguy,

There is an issue with mobile devices, sometimes submitting forms from mobile devices might cause double submit, we are working on this issue.


kcguy

  • Full Member
  • ***
  • Posts: 103
Re: Invalid CSRF token ???
« Reply #46 on: March 09, 2013, 11:33:44 pm »
Hi @kcguy,

There is an issue with mobile devices, sometimes submitting forms from mobile devices might cause double submit, we are working on this issue.

Any update on this. People need to be able to post with a mobile device....

komki

  • Newbie
  • *
  • Posts: 1
Re: Invalid CSRF token ???
« Reply #47 on: March 11, 2013, 05:44:36 pm »
I have same problem
http://www.suritrade.net/oc-admin
I host with netfirms.com
Site is live but i can not access the admin backend.

kcguy

  • Full Member
  • ***
  • Posts: 103
Re: Invalid CSRF token ???
« Reply #48 on: March 11, 2013, 10:06:07 pm »
Wierd stuff here....

I did 5 test today and all 5 worked Even if I got the token error

All 5 had images though ( only 2 had posted the image )

After looking and getting ready to remove my test ads I did notice that the some of the ads did not get filled completly when uploading as you can see below. These were done back to back to back to back to back....

They all should have been the same


donalexio

  • Newbie
  • *
  • Posts: 8
Re: Invalid CSRF token ???
« Reply #49 on: March 12, 2013, 04:03:18 pm »
after overwriting osc fix for this error there is nothing fixed. users after adding an ad they get a broken page (index doesn't load). if i try to add an ad with image, it doesn't work either.

donalexio

  • Newbie
  • *
  • Posts: 8
Re: Invalid CSRF token ???
« Reply #50 on: March 12, 2013, 04:04:01 pm »
after overwriting osc fix for this error there is nothing fixed. users after adding an ad they get a broken page (index doesn't load). if i try to add an ad with image, it doesn't work either.
i forgot to tell you that i work with chrome/mozilla on desktop for testing.

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Invalid CSRF token ???
« Reply #51 on: March 12, 2013, 04:40:13 pm »
Hi @kcguy,

We add a double submit prevention with javascript, has been added to modern theme.

You can see the changes here:

https://github.com/osclass/Osclass/commit/2992eaaacc02ebe4644af0ac5de162d3e20b9345
https://github.com/osclass/Osclass/commit/9529a85e3ea7d207a4a34b27301c14071f562cc2


donalexio

  • Newbie
  • *
  • Posts: 8
Re: Invalid CSRF token ???
« Reply #52 on: March 12, 2013, 11:17:20 pm »
after overwriting osc fix for this error there is nothing fixed. users after adding an ad they get a broken page (index doesn't load). if i try to add an ad with image, it doesn't work either.
i forgot to tell you that i work with chrome/mozilla on desktop for testing.
admins can try themselfs on my domain where i installed the script: www.vand-tractor.ro

kcguy

  • Full Member
  • ***
  • Posts: 103
Re: Invalid CSRF token ???
« Reply #53 on: March 13, 2013, 04:32:53 am »
Hi @kcguy,

We add a double submit prevention with javascript, has been added to modern theme.

You can see the changes here:

https://github.com/osclass/Osclass/commit/2992eaaacc02ebe4644af0ac5de162d3e20b9345
https://github.com/osclass/Osclass/commit/9529a85e3ea7d207a4a34b27301c14071f562cc2


THANKS garciademarina

THIS APPEARS TO HAVE WORKED FOR MY MOBILE ISSUES!!! :D :D :D :D :D :D :D :D :D

sammas

  • Newbie
  • *
  • Posts: 1
Re: Invalid CSRF token ???
« Reply #54 on: March 13, 2013, 01:41:51 pm »
same here problem...CRSF  error at login...

kcguy

  • Full Member
  • ***
  • Posts: 103
Re: Invalid CSRF token ???
« Reply #55 on: March 13, 2013, 06:45:59 pm »
same here problem...CRSF  error at login...

Have you tried making the changes as mentioned above to see if that works for you?

JOHNP

  • Newbie
  • *
  • Posts: 38
Re: Invalid CSRF token ???
« Reply #56 on: March 19, 2013, 10:16:34 am »
Hi Osclass,

I'm having the same problem since I upgraded to Osclass 3.1.  I was using my one of my accounts I had created earlier and tried to post an ad, but I get the following error:

Quote
The Recaptcha code is wrong

I'm using Modern theme and the Recaptcha code is not enabled for that particular form as I set once you signed up to become a member you don't need to do Recaptcha
Only new users or replying to ad will Recaptcha show.

My site is www.postingzoo.ca

I been reading through the thread and haven't really seen a solution yet.  I'm only with PairNetwork.

Thanks
« Last Edit: March 19, 2013, 10:31:00 am by JOHNP »

garciademarina

  • Administrator
  • Hero Member
  • *****
  • Posts: 974
Re: Invalid CSRF token ???
« Reply #57 on: March 19, 2013, 01:03:34 pm »
Hi JOHNP,

You have javascript errors in your theme.

We improve the way to include scripts and styles in this new version but  previous versions of some plugins aren't compatible.

You can try to update this plugins if there are compatibles with osclass 3.1 or you can change this 2 files:

You can edit your theme file functions.php

ROOT/oc-content/themes/modern/functions.php

At the end the file add this lines...

Code: [Select]
    osc_remove_hook('header', 'osc_load_scripts');
    osc_remove_hook('header', 'osc_load_styles');
    osc_add_hook('header', 'osc_load_scripts', 4);
    osc_add_hook('header', 'osc_load_styles', 4);

and for your oc-admin edit:

ROOT/oc-admin/themes/modern/functions.php

At the end the file add this lines...

Code: [Select]
    osc_remove_hook('admin_header', 'admin_theme_js');
    osc_remove_hook('admin_header', 'admin_theme_css');
    osc_add_hook('admin_header', 'admin_theme_js', 4);
    osc_add_hook('admin_header', 'admin_theme_css', 4);

Regards

JOHNP

  • Newbie
  • *
  • Posts: 38
Re: Invalid CSRF token ???
« Reply #58 on: March 20, 2013, 07:00:57 am »
Hi Carlos,

I've taken your suggestion and added the code provided to the two files, but I am still getting the error:

"The Recaptcha code is wrong"

I'm going to see if I can update the ReCaptcha and see if that works.  Will let you know

Thanks,

JOHNP

JOHNP

  • Newbie
  • *
  • Posts: 38
Re: Invalid CSRF token ???
« Reply #59 on: March 20, 2013, 07:59:52 am »
Hi Carlos,

I also want to add that the output also says "Invalid CSRF token."


Thanks,