CAPTCHA plugin

Compatible with DokuWiki

2009-12-25+

plugin Use an image verification (CAPTCHA) to defeat spambots

Last updated on
2010-06-07
Provides
Helper, Action
Repository
Source

Similar to recaptcha

Tagged with captcha, spam

Example CAPTCHA with image and Audio This plugin implements a Completely Automated Public Turing test to tell Computers and Humans Apart also known as CAPTCHA.

Download

Download the plugin using the plugin manager or manually from the download link above.

If you have problems using the plugin manager with the provided link, try to complete it adding the name of the zip file you can download with your browser, then using that url with the manager. (For example http://github.com/splitbrain/dokuwiki-plugin-captcha/zipball/master/splitbrain-dokuwiki-plugin-captcha-265a0b9.zip.)

Changes

Requirements

  • Needs the gd image library, on Ubuntu use sudo apt-get install php5-gd

Configuration

The plugin provides five different methods of CAPTCHAs selectable in the config manager.

The first one (js) displays 5 random characters which need to be copied into an input box. This task is done through JavaScript automatically, then the whole CAPTCHA test is hidden from the user. Usual Spambots won't execute JavaScript or search the page for the characters, so this test should be quite effective without requiring any manual interaction from most users. The test is perfectly accessible for disabled users or users without JavaScript.

The second method (text) work just like the JavaScript method but without the automatic JavaScript. This will defeat SpamBots with enabled JavaScript but requires more interaction from users. It's still pretty simple to defeat by analyzing the page source. Accessibility is as good as with the first method.

The third method (image) finally does display the random chars as an automatically generated image. This test can not be defeated without using costly OCR techniques. Unfortunately this method effectively locks out blind users or users with textbrowsers. This feature needs the libGD PHP extension.

The fourth method (audio) improves the accessibility of the image CAPTCHA by adding a .wav download. The .wav file plays the letters of the CAPTCHA read in the NATO phonetic alphabet. Please note, that because of the way how the wave file is generated it might be easier to automatically decode than the image.

The fifth method (figlet) creates an ASCII art rendering of the text. It has very bad accessibility and is relatively easy to defeat by a script, but is funny to look at ;-)

If you select the image type you may specify the size of the generated image. Larger images take more screen space and might be easier to recognize with OCR. On the other hand larger images are better to read for humans, too.

By default the CAPTCHA method is only applied for anonymous users. You may enable it for logged in users as well through the forusers option.

The CAPTCHA plugin not only protects the edit form but the user registration process, too. You can disable this through the regprotect option.

Helper Methods

The plugin provides a helper plugin which let's you add CAPTCHA checks to your own plugins. The helper provides three methods:

isEnabled()

Returns true when the CAPTCHA should be used - it checks the forusers config option for you. Always check this method before using the other methods.

getHTML()

Returns the HTML for the CAPTCHA. It takes care of all other CAPTCHA options.

check($msg=true)

Use this function to check if the CAPTCHA was filled correctly. It returns false if the CAPTCHA was not filled correctly and by default also prints a message about it. If you don't want this message, pass false as first parameter.

plugin/captcha.txt · Last modified: 2010/12/21 21:20 by andi
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate