Explanation and phases of double form submission

1 view
Skip to first unread message

voltron

unread,
Jan 22, 2009, 12:39:52 AM1/22/09
to web2py Web Framework
Hi Massimo,

can you detail out how double form submission is prevented using
web2py in details and phases?


Thanks

voltron

unread,
Jan 22, 2009, 12:54:50 AM1/22/09
to web2py Web Framework
That should have read "prevention" :-))

mdipierro

unread,
Jan 22, 2009, 2:41:42 AM1/22/09
to web2py Web Framework
if the form is accepted via accepts(request.vars,session) than it uses
session to associate a one-time uuid to the form.
if you submit twice, the second time the form is not accepted because
the uuid was used. You can see this in the form

<input type="hidden" name="_formkey" value="...." />

Massimo
Reply all
Reply to author
Forward
0 new messages