Changes between Version 2 and Version 3 of MathCaptchaPlugin


Ignore:
Timestamp:
Jul 7, 2009 1:01:37 AM (5 years ago)
Author:
robm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MathCaptchaPlugin

    v2 v3  
    44 
    55This is a small plugin to present an anonymous user with simple math addition problems in order to submit a new ticket or to make edits in the wiki.  Currently there is no customization: it presents two integers in the range of 1 - 10 and asks the user to add them together. 
     6 
     7== Version 2.0 == 
     8 
     9I'm starting to see some particular spambots get through the simple captcha, so I'm releasing version 2.0 that includes a slight modification to the format presented to the user.  In addition, this version now correctly works with fcgi and mod_python by saving the captcha information in the trac database.  (To use mod_python as an example: apache may start many processes where each has its own embedded python interpreter.  The particular apache process than displayed the form may not be the same one that processes the form request, so there must be a persistent way to store the solution to the captcha rather than making it easy for spambots by encoding the solution in the web page itself.) 
     10 
     11I'm also keeping a 30 day record of failed attempts in the same database so you can get an idea of what sort of spambots are trying to get through your defenses. 
    612 
    713For the future, would be nice if there were multiple types of math problems presented in a way that wouldn't be easy for a bot to recognize. 
     
    2026Download the zipped source from [download:mathcaptchaplugin here]. 
    2127 
    22 == Source == 
     28== Install == 
    2329 
    24 You can check out MathCaptchaPlugin from [http://trac-hacks.org/svn/mathcaptchaplugin here] using Subversion, or [source:mathcaptchaplugin browse the source] with Trac. 
     30Install by either copying the !MathCaptcha.py file into your {{{/path/to/project/environment/plugins}}} directory, or use 
     31{{{ 
     32python setup.py install 
     33}}} 
     34from within the source directory. 
    2535 
    26 == Example == 
    27  
    28 To enable the plugin, add the line: 
    29  
     36Version 2.0 of the plugin creates a new database needed for processing captchas when run using fcgi or mod_python, so you'll have to run 
     37{{{ 
     38trac-admin /path/to/project/environment upgrade 
     39}}} 
     40before you can use the plugin.  Once installed and the environment is upgraded, the plugin must be enabled by adding a line to the ''components'' section in trac.ini: 
    3041{{{ 
    3142[components] 
    3243mathcaptcha.* = enabled 
    3344}}} 
     45Finally, give anonymous users any of the following permissions: '''TICKET_CREATE''', '''TICKET_MODIFY''', '''WIKI_CREATE''', or '''WIKI_MODIFY'''.  Anonymous users will then be prompted to solve a math problem before being allowed to submit it, while authenticated users will not see the captcha. 
    3446 
    35 to the ''components'' section in trac.ini. 
     47== Source == 
    3648 
     49You can check out MathCaptchaPlugin from [http://trac-hacks.org/svn/mathcaptchaplugin here] using Subversion, or [source:mathcaptchaplugin browse the source] with Trac. 
    3750 
    3851== Recent Changes ==