Author Topic: New reCAPTCHA plugin  (Read 16791 times)

Offline dennylin93

  • Jr. Member
  • **
  • Posts: 17
New reCAPTCHA plugin
« on: February 06, 2010, 08:19:05 AM »
Hi, I've written a plugin that shows a reCAPTCHA box after too many failed login attempts. The failed attempts are saved in SQL and purged after a certain amount of time.

Fixed issues:
  • MySQL and PostgreSQL are supported.
  • IPs aren't purged if user doesn't visit.
  • Users that fail reCAPTCHA aren't allowed to login. However, the method is crude and ugly.
  • Might conflict with the remember_me plugin.

The gzipped file: rcguard-0.2.0.tar.gz.

Also on GitHub: rcguard.

Comments and suggestions are welcome. This is my first plugin, so there probably are a lot of problems.
« Last Edit: June 08, 2010, 03:33:48 AM by dennylin93 »

Offline dennylin93

  • Jr. Member
  • **
  • Posts: 17
New reCAPTCHA plugin
« Reply #1 on: February 07, 2010, 08:52:39 AM »
All the issues should be fixed with this version: rcguard 0.2.0.
« Last Edit: February 07, 2010, 08:54:54 AM by dennylin93 »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
New reCAPTCHA plugin
« Reply #2 on: February 08, 2010, 02:54:12 AM »
Nice plugin, can you post some screenshots?

Offline dennylin93

  • Jr. Member
  • **
  • Posts: 17
New reCAPTCHA plugin
« Reply #3 on: February 08, 2010, 08:11:20 AM »
Sure, I've attached a screenshot of the login form.

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
New reCAPTCHA plugin
« Reply #4 on: February 08, 2010, 10:17:08 AM »
great work plugin works fine !!!

many thanks

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
New reCAPTCHA plugin
« Reply #5 on: February 10, 2010, 09:58:42 AM »
to change language in capchta
edit rcguard.js

and replace
var RecaptchaOptions = {
  
theme 'white'
};


with
var RecaptchaOptions = {
  
theme 'white',
  
lang 'de'
};


de for German

see here for more options
reCAPTCHA API Documentation

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
New reCAPTCHA plugin
« Reply #6 on: February 10, 2010, 10:16:06 AM »
recaptcha dont display correct in some old Browsers IE6 IE7
to fix this edit rcguard.css and replace all with

@charset "utf-8";

#rcguard {
    
margin-bottom0px;
}

#recaptcha {
    
positionrelative;
}

Offline dennylin93

  • Jr. Member
  • **
  • Posts: 17
New reCAPTCHA plugin
« Reply #7 on: February 10, 2010, 07:41:16 PM »
Hmm... Looks like we have a problem. The fix above doesn't work with Firefox. I'll try to find a solution that works with all browsers.
« Last Edit: February 10, 2010, 07:45:55 PM by dennylin93 »

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
New reCAPTCHA plugin
« Reply #8 on: February 11, 2010, 09:30:24 AM »
in my firefox works with this
tested with FF 3.6 and 3.5 IE6, IE7 and IE8, Opera 10, and Google Chrome tested with Windows 7 and XP and FF 3.6 under linux.

which FF version you use.

Offline dennylin93

  • Jr. Member
  • **
  • Posts: 17
New reCAPTCHA plugin
« Reply #9 on: February 11, 2010, 08:25:13 PM »
I'm using Firefox 3.6 and Opera 10 under FreeBSD.

Offline hosenhans

  • Jr. Member
  • **
  • Posts: 30
New reCAPTCHA plugin
« Reply #10 on: February 12, 2010, 06:44:02 AM »
Thank you very much for this wonderful plugin :-)

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
patch for rcguard
« Reply #11 on: March 10, 2010, 03:46:17 AM »
Hi dennylin93,

i have implement a little optimization to rcguard
this delete after successful login the mysql entry of this user from rcguard table.

see attachment

Offline dennylin93

  • Jr. Member
  • **
  • Posts: 17
New reCAPTCHA plugin
« Reply #12 on: March 10, 2010, 06:08:29 AM »
Thanks for the feedback.

I actually added this feature previously, but took it out later. If someone successfully hacks into an account, then the entry is deleted and he can skip the reCAPTCHA verification.

I think I'll add this as a tunable feature with on and off in the config file. I've been really busy recently, so I'll have to find some time to do this.

Offline ontnugtering

  • Jr. Member
  • **
  • Posts: 25
New reCAPTCHA plugin
« Reply #13 on: May 31, 2010, 04:10:10 AM »
I have a problem: Recaptcha does simply not appear.

What I did: Created SQL tables, installed and activated the plugin, registered at recaptcha service, copied and configured config.inc.php with the pub and private keys... Hmmm.

EDIT: What's wrong? With phpmyadmin (I'm on a web hoster) I can see the MYsql rcguard table has NO entries...

EDIT2: SOLVED, I was stupid. I added the 'rcguard' entry to an outcommented plugins line (//) OMG ;) So, the plugin WORKS NICELY. THANKS!
« Last Edit: May 31, 2010, 04:25:16 AM by ontnugtering »

Offline lumen

  • Newbie
  • *
  • Posts: 2
New reCAPTCHA plugin
« Reply #14 on: July 06, 2010, 02:49:18 AM »
I have problem: recaptcha not work.
Created SQL tables, installed and activated the plugin, registered at recaptcha service, copied and configured config.inc.php with the pub and private keys.