Captcha for new Moodle sign-ups

Captcha for new Moodle sign-ups

by Bill Best -
Number of replies: 12
Hi

Our Moodle installation is being hammered by spammers trying to sign up for accounts.

They never follow through the step of account confirmation but we still have to go in and delete the accounts one by one. We've had a look at Admin ->users-> authentication but can't see any step to use to implement a captcha test to stop machines from signing up.

Is there anything available or in development at all?

With best regards

Bill
--
Sheffield, UK
http://www.communityradiotoolkit.net/
Average of ratings: -
In reply to Bill Best

Re: Captcha for new Moodle sign-ups

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers

Is there anything available or in development at all?

Nothing that I'm aware of sad

Saludos. Iñaki.

In reply to Iñaki Arenaza

Re: Captcha for new Moodle sign-ups

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
There was a CAPTCHA question type in the feedback module. I'm not sure how much of that code might be useful. There are also other FOSS projects - like PHPbb that as I remember were using CAPTCHA with registration. Hopefully it will not be too difficulty to put something together. It sounds like a reasonable feature request so if it is not already in the tracker please feel free to add it. Peace - Anthony
In reply to Bill Best

Re: Captcha for new Moodle sign-ups

by Steve Hyndman -

I use the script at the link below in some other web applications, but not in Moodle...I did test it a few months ago on an old Moodle site that I no longer use...see it here by clicking on the "Create new account" button...if it's working correctly, then you shouldn't be able to get to the account creation page.

If I were going to use it on an active Moodle site, I would simply add the username and password to the sign-up page so "real people" would know what to enter...then I may even periodically change the username and password. Not exactly Captcha, but accomplishes the same result.

http://www.phpsecurepages.com/

Steve

In reply to Bill Best

Re: Captcha for new Moodle sign-ups

by Martín Langhoff -
I haven't heard of anything either. Not too hard to do though wink

OTOH, an easier fix would be to add a cron task to purge those stale never confirmed accounts after 48hs.
In reply to Martín Langhoff

Re: Captcha for new Moodle sign-ups

by Bill Best -
Hi

Martin said:
> I haven't heard of anything either. Not too hard to do though
wink

Ok, got any clues?

There are a few free captcha scripts available but I have no idea as to how to integrate with ../login/signup_form.php

> OTOH, an easier fix would be to add a cron task to purge those stale never
> confirmed accounts after 48hs.


Sounds good to me. Any clues as to where the unconfirmed account data is held. I've checked various tables but no joy so far.

Many thanks in advance and best regards

Bill
--
Sheffield, UK
In reply to Bill Best

Re: Captcha for new Moodle sign-ups

by Chardelle Busch -
Picture of Core developers
Or, you could set the cleanup (Admin>Server>Cleanup) to less than 7 days (the default time when unconfirmed accounts are automatically deleted).
In reply to Bill Best

Re: Captcha for new Moodle sign-ups

by Stephen Bourget -
Picture of Core developers Picture of Plugin developers Picture of Testers
You may want to look at tracker issue number MDL-7407. It looks like someone wrote one and posted a patch there
In reply to Stephen Bourget

Re: Captcha for new Moodle sign-ups

by Garfield Lucas -
I just discovered that spambots have hit our site with sqillions of spammy requests for membership. Whilst none are approved and none of our students can actually see them, it is still a damned nuisance getting rid of them all.

Just wanted to say that I applied the patch detailed in the previous post. It only took a few minutes to do and it seems to work very well indeed. Only thing is, I suggest you you use the later freecap_patch2.zip patch c/w language file.

Also if you overwrite the existing signup_form.php with the one contained in the patch the you do NOT need to execute...
patch -p < signup_form.php.diff

But you MUST edit your moodle/config.php adding this line...
$CFG->usecaptcha = true

I really hope that this (or something similar) will be built in to future releases of Moodle as standard because spambots are really becoming a nightmare for site admins.

Best wishes, Garf.
In reply to Garfield Lucas

Re: Captcha for new Moodle sign-ups

by Tony Hursh -
Whilst none are approved and none of our students can actually see them, it is still a damned nuisance getting rid of them all.

Set "Delete unconfirmed users after" to "1 hour" in Administration/Server/Cleanup and they should go away without having to do a manual delete.



In reply to Tony Hursh

Re: Captcha for new Moodle sign-ups

by Garfield Lucas -
Thanks Tony. I did that too - albeit only until all the bogus users had disappeared off our system.

Strangely enough, the bogus users didn't disappear after the first cron - which worried me a little. But they did after the second. Certainly simpler (and safer) than running an update query on the "Users" table in PHPMyAdmin!

Thing is I really wanted to stop it happening in the first place. It is hogging bandwidth, generating email traffic that bounces back to me and most importantly, I want to allow legitimate users plenty of time to pick up their mail. The "Captcha" patch certainly seems to do the trick.

One up for the Moodle community methinks! Thanks to everyone who helped in resolving this.

Best wishes, G.
In reply to Garfield Lucas

Re: Captcha for new Moodle sign-ups

by Dan Romanchik -
I am running an old version (1.4.2) of Moodle on www.flxclasses.com. I tried applying this patch to install Captcha, but it doesn't seem to be working. I did overwrite the existing signup_form.php and did edit the config.php file. I did not run the patch program.

Fortunately, the signup form still seems to work, but I'm not seeing and Captchas.

Dan
In reply to Dan Romanchik

Re: Captcha for new Moodle sign-ups

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Dan,

IIRC, the patch was written for 1.8. I recommend you to upgrade to a more recent version of Moodle - 1.4 is so old you can't expect backporting new features.