If cookies are disabled, CAPTCHA validation is impossible.
The user gets in this case a message "invallid CAPTCHA token", which is cryptic and contains no indication how (s)he could solve this problem.
This patch detects on validation if cookies are disabled and generates a more user friendly error message "Cookies should be enabled in your browser for CAPTCHA validation."
| Comment | File | Size | Author |
|---|---|---|---|
| cookies_1.patch | 1.2 KB | soxofaan |
Comments
Comment #1
phillipadsmith commentedHi ho,
After investigating the issue with CAPTCHA validation for IE7 users, I stumbled on this patch. And, after patching, it's clear that IE7 is blocking cookies and preventing the CAPTCHA from validating. So, I'm wondering, is there a long-term solution to address CAPTCHA validation for users with cookies disabled / blocked?
Phillip.
Comment #2
robloachTrusting you on this one ;-) .
Comment #3
robloachNeeds to move to HEAD for Drupal 6.
Comment #4
soxofaan commentedMaybe it was to early to commit (but it doesn't hurt either).
I'm a bit concerned about #1.
The patch did not really check for cookies, but it checks for a symptom when cookies are not enabled (no $_SESSION).
It could be that the problem reported in #1 is a false negative detection: cookies are enabled but still no $_SESSION.
Since I don't have IE7 in my toolbox, I can't check this. Rob (you're a windows guy, right?) can you check this?
Comment #5
robloachI tested and it worked. I couldn't get it to deny my access though.
Comment #6
phillipadsmith commentedHappy to test also... just let me know. I'm unclear on the session question, however.
The behavior I saw was that if IE7's "Privacy" settings are higher than the default, the browser rejects all cookies and the CAPTCA then has a value of "" (null) (at least, that's what shows in the log).
I adjusted the message to something a bit more helpful, and provided a couple of links on how to adjust those settings on popular browsers.
:-)
Phillip.
Comment #7
phillipadsmith commentedHere's a relatively thorough / informative page that could be linked from the error message:
http://www.google.com/support/accounts/bin/answer.py?answer=61416
Comment #8
soxofaan commentedIn HEAD I started with an experimental CAPTCHA branch for Drupal 6,
In the first iteration (http://drupal.org/cvs?commit=101505) I replaced the storage of the solution in the $_SESSION variable with a dedicated table {captcha_challenges}. One of the advantages of this design is that CAPTCHA now also works when cookies are disabled. Yay.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #10
soxofaan commented#301564: Warn when cookies are disabled reminded me that this feature needed to be ported to 6.x-1.x
http://drupal.org/cvs?commit=136946