Welcome Guest, Not a member yet? Register   Sign In
CSRF and double posting
#3

(This post was last modified: 06-19-2016, 12:49 AM by PaulD. Edit Reason: added some PS's )

Hi,

Thanks for that answer. I agree that Ajax is a different issue and I have just been trying to exclude some ajax URI's but the regex's defeated me (it is a very dynamic url), so instead reverted to the more usual including of the hash and token directly in the js. And as far as I have experienced it, ajax calls regenerate the CSRF too.

In the example I am looking at though, it is a straight up HTML form. In fact, all it does is add a new record so the form is just taking a name/title for the record, and that is it. But double clicking the button quickly is creating two records to be inserted. Which is quite frustrating. This example is my own site that I am just building for myself, but this relatively small issue has really irked me and the more I have tried to fix it the more it is annoying me.

I am just having a look at the CI token handling now, as I cannot believe that a double post has time to pass two checks before CI updates the token, but if it happens at different stages of the process, and not immediately upon the first check, then I suppose it might.

The file you linked to is coded so beautifully, it was a pleasure to have a read of it. Thank you. I recently chose ion_auth over community_auth but it was a hard and probably personal decision. Look forward to trying community auth though.

Best wishes,

Paul.

PS I too never leave a page hanging and love using those tiny animated loading gifs for ajax messaging during ajax calls. They childishly always make me feel all 'professional' even though they are just tiny gifs :-)
PPS I love making them as well - customers are always so impressed with a little personalized favicon based loading gif :-)
Reply


Messages In This Thread
CSRF and double posting - by PaulD - 06-18-2016, 11:03 PM
RE: CSRF and double posting - by skunkbad - 06-19-2016, 12:05 AM
RE: CSRF and double posting - by John_Betong - 06-20-2016, 09:25 PM
RE: CSRF and double posting - by skunkbad - 06-20-2016, 10:55 PM
RE: CSRF and double posting - by PaulD - 06-19-2016, 12:43 AM
RE: CSRF and double posting - by PaulD - 06-19-2016, 01:00 AM
RE: CSRF and double posting - by PaulD - 06-19-2016, 03:19 AM
RE: CSRF and double posting - by skunkbad - 06-19-2016, 09:30 AM
RE: CSRF and double posting - by PaulD - 06-19-2016, 03:06 PM
RE: CSRF and double posting - by skunkbad - 06-19-2016, 03:35 PM
RE: CSRF and double posting - by PaulD - 06-19-2016, 05:59 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 11:18 AM
RE: CSRF and double posting - by Narf - 06-20-2016, 12:26 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 12:37 PM
RE: CSRF and double posting - by Narf - 06-20-2016, 01:49 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 02:32 PM
RE: CSRF and double posting - by PaulD - 06-20-2016, 01:46 PM
RE: CSRF and double posting - by PaulD - 06-20-2016, 04:02 PM
RE: CSRF and double posting - by spjonez - 06-20-2016, 07:00 PM
RE: CSRF and double posting - by Narf - 06-21-2016, 03:38 AM
RE: CSRF and double posting - by spjonez - 06-21-2016, 08:54 AM
RE: CSRF and double posting - by Narf - 06-22-2016, 05:14 AM
RE: CSRF and double posting - by Martin7483 - 06-23-2016, 03:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB