Add reCAPTCHA support to Review Board.

Review Request #1214 - Created Nov. 13, 2009 and submitted

Christian Hammond
Review Board
master
reviewboard
Add reCAPTCHA support to Review Board.

This change introduces optional support for captchas during the registration
process. reCAPTCHA is used for this, as it's pretty wide-spread, maintained,
has both visual and audio versions, works with or without JavaScript, and
has a nice side-effect of helping to scan old books.

Users can register accounts on http://www.recaptcha.net and enable captcha
support in the admin UI with the public and private keys provided on the
site.

This also splits off all the authentication-related settings into a dedicated
Authentication settings page.

Docs have been updated to talk about the new page and the captchas.
Tested the following scenarios:

* Registration without a captcha
* Registration with a captcha and a wrong answer
* Registration with a captcha and a right answer
Christian Hammond
David Trowbridge
  1. 
      
  2. Our flow through this page kind of sucks, but given the appearance of the reCAPTCHA box, I'm not sure we need the text here, at least as written. The reCAPTCHA box has the arrow and "Type the two words"
  3. reviewboard/accounts/forms.py (Diff revision 1)
     
     
    Please include docstrings
  4. reviewboard/accounts/forms.py (Diff revision 1)
     
     
     
     
    Probably won't be seen? What if the entered text is wrong? It seems like this error message is a little crummy.
    
    Speaking of which, I'm not sure I like using the word "captcha" in the UI. I know it has the "reCAPTCHA" logo in there, but most people don't know the term and I think would ignore that logo. I'm not sure what's better, though.
    1. The reason for this is that in reality, the string won't be seen in this form. We don't have any code for showing errors for this field. The reCAPTCHA widget itself handles error display using the error string we give it.
      
      This validation error is more useful for debugging or something. I just wanted to return *something*, as you can't return an empty string for the ValidationError, I don't think.
      
      Changing the string though to be a bit better.
  5. reviewboard/admin/forms.py (Diff revision 1)
     
     
     
     
     
    I know this has the link to recaptcha.net, but looking at the screenshot it's really hard to see and the flow through the config UI isn't super clear. I'd prefer a more explicit "go register _here_ and then type in your keys below."
  6. 
      
Christian Hammond
Review request changed

Change Summary:

* Removed the text above the captcha.
* Changed the validation error string to be more clear and not mention "captcha."
* Made it clear that the validation error string isn't actually shown to users, but is more for debugging.
* Added docstrings to RegistrationForm.
* Changed the help text for the captcha setting to link to the reCAPTCHA site registration page.

Diff:

Revision 2 (+422 -209)

Show changes

David Trowbridge
  1. 
      
  2. 
      
Loading...