Project

General

Profile

Actions

Feature #6373

closed

Spam Prevention - Captcha in registration page

Added by Rahul Singh about 10 years ago. Updated about 9 years ago.

Status:
Feature implemented
Priority:
High
Assignee:
Daniel Barreto
Category:
Global / Others / Misc
Target version:
Start date:
07/07/2013
Due date:
% Done:

100%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Current registration (Chamilo 1.9.6) page is very simple, and registering using bots is very easy.

Is there any way to add captcha code in registration and login page.


Files

6373_1.png (57.2 KB) 6373_1.png Daniel Barreto, 09/04/2014 20:52
Actions #1

Updated by Yannick Warnier about 10 years ago

Hi Rahul,
We have plans for that, yes. If you would like to speed this up, any suggestion or code contribution (you can fork us on Github) is welcome. As far as we can see, the logic would be something like:

  1. offer login without any captcha
  2. if failing once, ask for captcha
  3. if failing the login+captcha twice, then ask for a waiting period of 5 minutes before any new attempt is made

Anything more specific you would add?

To fork Chamilo 1.9 on Github, go here https://github.com/chamilo/chamilo-lms/tree/1.9.x and click the "Fork" button on the top right side. Then clone this repo on your computer, make the code change, send a commit and go to your repo on Github and click the "Send pull request" button. We can then check your code and approve it if it's OK (or change it before we do).
To specify the 1.9.x branch, you will have to clone the full repository (it's about 1GB heavy, but you only have to do this once) and to specify the branch in which you want to work, from inside the cloned repo:
git checkout --track origin/1.9.x

Actions #2

Updated by Yannick Warnier about 10 years ago

  • Category set to Global / Others / Misc
  • Status changed from New to Feature implemented
  • Assignee set to Julio Montoya

This has been implemented in 1.9.8. To enable (once 1.9.8 is out), add this line to your main/inc/conf/configuration.php file:
$_configuration['enable_captcha'] = true;

Actions #3

Updated by Eric Petitdemange about 10 years ago

Hi guys,

As a test, I installed the latest nightly (nightly 22) and added the line, no luck.

Is there a specific location to get this working ?

Thanks in advance :)

Actions #4

Updated by Julio Montoya about 10 years ago

  • Status changed from Feature implemented to Needs testing
  • Assignee deleted (Julio Montoya)

Coursenligne 45 wrote:

Hi guys,

As a test, I installed the latest nightly (nightly 22) and added the line, no luck.

Is there a specific location to get this working ?

Thanks in advance :)

Hello Eric,

You have to add some parameters in your configuration.php file:

$_configuration['allow_captcha'] = true;
$_configuration['captcha_time_to_block'] = 2; // minutes
$_configuration['captcha_number_mistakes_to_block_account'] = 3; 

Add a 'text' user extra field called 'captcha_blocked_until_date'

that should do the thing.

I configured https://stable.chamilo.org with those parameters.

Actions #5

Updated by Eric Petitdemange about 10 years ago

En ajoutant les lignes, j'ai une page blanche pendant les 2 minutes, pas de captcha, j'ai regardé sur stable.chamilo, cela fonctionne.....

Je verrai pour explorer le fonctionnement, car c'est vraiment excellent !

Merci Julio.

Actions #6

Updated by Yannick Warnier almost 10 years ago

  • % Done changed from 0 to 80

Eric, you should try that again. I believe we did a few additional changes which might allow you to give us a green light to close this feature request.

Actions #7

Updated by Yannick Warnier almost 10 years ago

  • Assignee set to Daniel Barreto

Assigning to Daniel in the meantime, just in case you don't get the opportunity to try it soon.

Actions #8

Updated by Julio Montoya over 9 years ago

  • Assignee changed from Daniel Barreto to Yoselyn Castillo

Seems that Daniel is not here :) Yoselyn can you make some tests?

Actions #9

Updated by Yoselyn Castillo over 9 years ago

  • Status changed from Needs testing to Needs more info

I have tried in stable.chamilo.org and in my local pc with those specific parameters, but i can't see capthcha, Is it necessary other configuration? Please let me know

Actions #10

Updated by Yannick Warnier over 9 years ago

  • Subject changed from Spam Prevention -Captcha in registration page to Spam Prevention - Captcha in registration page
Actions #11

Updated by Yoselyn Castillo over 9 years ago

  • Status changed from Needs more info to Assigned
  • % Done changed from 80 to 40

In stable.chamilo.org, it looks very nice into login form when login fails, but as i see Rahul is asking for this field in main/auth/inscription.php
I take this

Actions #12

Updated by Yannick Warnier over 9 years ago

  • Priority changed from Normal to High

Hi Yoselyn,
Please don't take too long implementing this. I would like to close all "feature requests" next week and only have bug reports to treat for our code sprint.

Actions #13

Updated by Yoselyn Castillo over 9 years ago

The captcha in login page had errors in require_once clause in main/inc/lib/pear/Text/Captcha/Exception.php. This is fixed by https://github.com/chamilo/chamilo-lms/pull/240
That's why inclusion in registration page is retarded :)

Actions #14

Updated by Yoselyn Castillo over 9 years ago

  • % Done changed from 40 to 80

Done. Captcha was added to inscription.php in
https://github.com/chamilo/chamilo-lms/pull/240/

Actions #15

Updated by Yannick Warnier over 9 years ago

  • Status changed from Assigned to Needs testing
  • Assignee changed from Yoselyn Castillo to Daniel Barreto

Assigned to Daniel for testing

Actions #16

Updated by Daniel Barreto over 9 years ago

Tested and working, here a picture

Actions #17

Updated by Daniel Barreto over 9 years ago

  • Status changed from Needs testing to Feature implemented
  • % Done changed from 80 to 100
Actions #18

Updated by Luis Carlos Mariaca Choque about 9 years ago

saludos yo tengo la version 1.9.8 y tengo agregado los cambios que ya se solicitan pero aun asi no funciona CAPTCHA

Actions

Also available in: Atom PDF