mod_captcha_registration/README.wiki
changeset 1786 29f3d6b7ad16
equal deleted inserted replaced
1785:12ac88940fe3 1786:29f3d6b7ad16
       
     1 #summary provides captcha protection for registration form
       
     2 #labels Stage-Beta
       
     3 
       
     4 = Introduction =
       
     5 
       
     6 Prosody-captcha is a little modification of prosody's "mod_register.lua" module that provides captcha protection for registration form.
       
     7 
       
     8 = Installation =
       
     9 First of all you should build and install lua bindings for libgd — [https://github.com/ittner/lua-gd/ lua-gd].
       
    10 
       
    11 Then clone repsository lua-captcha:
       
    12 
       
    13 *{{{ $ git clone https://github.com/mrDoctorWho/lua-captcha }}}*
       
    14 
       
    15 install it:
       
    16 
       
    17 *{{{ $ make install }}}*
       
    18 
       
    19 = Configuration =
       
    20 
       
    21 After that you would configure prosody. This module requires from you 4 fields, you should add this into your VirtualHost entry.
       
    22 
       
    23 {{{
       
    24 captcha_config = {
       
    25         dir = "/tmp"; -- Directory used to storage captcha images. Please make sure prosody user allowed to write there.
       
    26         timeout = 60; -- Timeout when captcha will expire
       
    27         web_path = "challenge"; -- Web path used to separate main prosody site from itself modules.
       
    28         font = "/usr/lib/prosody/FiraSans-Regular.ttf" -- Font used for captcha text
       
    29 }
       
    30 }}}
       
    31 
       
    32 You can run script "install.lua" to install this or instead of that while prosody developers didn't accepted "dataforms" changes you should replace standard prosody "dataforms.lua" located in ubuntu in /usr/lib/prosody/util by another one from this repository. You should do the same thing with "mod_register.lua" located in ubuntu in /usr/lib/prosody/modules.
       
    33 
       
    34 After this all you can try to register on your server and see the captcha.
       
    35 
       
    36 = TODO =
       
    37   * Maybe use recaptcha instead of libgd.