Captchas fails when we open many windows
Posted: Thu Sep 07, 2006 11:09 am
This is a simple sample scenario that the current captchas verification mechanism fails:
1. Open blog entry 1 in browser window 1
2. Open blog entry 2 in browser window 2
3. Write a comment for entry 1 in browser window 1 and press the Send button -> failure
The verification fails because the session variable generated by the server when we opened entry 1 has been erased when we opened entry 2 (the server generates a new value). The conflict comes from the fact that there is only one variable holding this value.
In my opinion, we can do a bit different: the server holds a variable-size-array of captchas values. Each time a blog entry is open, we push a new captchas value in this array and send its index to the browser (a field in the comment form). When the viewer submit his comment, this index number will be sent back to the server, and the server will be able to find out the correct captchas value.
Thanks for your attention.
Best regards.
1. Open blog entry 1 in browser window 1
2. Open blog entry 2 in browser window 2
3. Write a comment for entry 1 in browser window 1 and press the Send button -> failure
The verification fails because the session variable generated by the server when we opened entry 1 has been erased when we opened entry 2 (the server generates a new value). The conflict comes from the fact that there is only one variable holding this value.
In my opinion, we can do a bit different: the server holds a variable-size-array of captchas values. Each time a blog entry is open, we push a new captchas value in this array and send its index to the browser (a field in the comment form). When the viewer submit his comment, this index number will be sent back to the server, and the server will be able to find out the correct captchas value.
Thanks for your attention.
Best regards.