Ticket #3051 (closed enhancement: worksforme)

Opened 5 years ago

Last modified 11 months ago

Recaptcha support for comments

Reported by: arteme Assigned to: osimons
Priority: normal Component: AddCommentMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

From personal experience, comments added by AddCommentMacro are not filtered by any Trac spam filter plugins. Attached is a patch for 0.10-version of the macro to integrate the recaptcha.net support.

To use, one must explicitly turn on recaptcha feature in the ini-file:

[addcomment]
recaptcha = on
recaptcha_private_key = ...
recaptcha_public_key = ...

When enabled, a recaptcha widget will appear below the comment input field and buttons. The default behavior is to require only anonymous users to solve the captcha. If logged in users are required to solve one as well, add

recaptcha_logged_in = on

to the aforementioned block in the ini-file.

In case if the captcha is solved correctly, pressing "Add comment" button will add the comment. If the captcha is solved incorrectly, "Add comment" will instead switch to "Preview" functionality, displaying a message that the captcha needs to be solved before the comment can be posted.

Attachments

addcomment-0.10-r3699-repatcha.patch (9.1 kB) - added by arteme on 05/20/08 09:25:01.
recaptcha support for Trac-0.10 version of AddCommentMacro
repatcha-screenshot.png (97.7 kB) - added by arteme on 05/20/08 09:31:26.
Screenshot of the recaptcha-enabled AddCommentMacro in action.

Change History

05/20/08 09:25:01 changed by arteme

  • attachment addcomment-0.10-r3699-repatcha.patch added.

recaptcha support for Trac-0.10 version of AddCommentMacro

05/20/08 09:31:26 changed by arteme

  • attachment repatcha-screenshot.png added.

Screenshot of the recaptcha-enabled AddCommentMacro in action.

05/26/08 15:11:03 changed by thomas.moschny@gmx.de

See also #3076.

05/26/08 15:30:27 changed by cboos

  • owner deleted.

(I'm not in charge of this plugin)

07/01/08 05:36:36 changed by anonymous

How do you install this onto your own trac?

07/21/08 23:31:07 changed by anonymous

  • owner set to athomas.

(follow-up: ↓ 6 ) 07/22/08 01:57:28 changed by athomas

  • owner changed from athomas to osimons.

I think osimons is maintaining this plugin now.

(in reply to: ↑ 5 ; follow-up: ↓ 7 ) 07/22/08 15:39:43 changed by osimons

Replying to athomas:

I think osimons is maintaining this plugin now.

Yeah, I suppose I am.

Personally I don't feel the need for an addcomment-only captcha implementation against one particular service.

However: I recently added change listener support for 0.11 version ([3723]), meaning trac:wiki:SpamFilter and similar plugins will work for comments. Would not that be a sufficient solution to the original issue raised? I propose worksforme, advicing update to 0.11 and using spamfilter plugin...

(in reply to: ↑ 6 ) 07/22/08 16:44:30 changed by arteme

Replying to osimons:

Personally I don't feel the need for an addcomment-only captcha implementation against one particular service. However: I recently added change listener support for 0.11 version ([3723]), meaning trac:wiki:SpamFilter and similar plugins will work for comments. Would not that be a sufficient solution to the original issue raised? I propose worksforme, advicing update to 0.11 and using spamfilter plugin...

The current patch was born out of the lack of AddComment-SpamFilter integration. I think it may be useful for people still using 0.10 for one reason or another, but I see no point in maintaining it as such for 0.11 and onwards...

(follow-up: ↓ 9 ) 07/22/08 17:01:42 changed by thomas.moschny@gmx.de

Porting my patch from [3723] to 0.10 shouldn't be that hard...

(in reply to: ↑ 8 ) 07/22/08 23:40:22 changed by osimons

Replying to thomas.moschny@...:

Porting my patch from [3723] to 0.10 shouldn't be that hard...

No it shouldn't really. Question is, do we want to? I haven't been running the 0.10 version for a long time, and pending reports of any major bugs or security implications I likely never will again... I personally consider the feature-set of 0.10 as frozen at this stage with Trac 0.11 released (and 0.10-stable frozen), but will of course happily commit useful backports if someone volunteers to maintain the old version.

Any takers?

08/30/11 18:40:29 changed by osimons

  • status changed from new to closed.
  • resolution set to worksforme.

Well, no chance of fixing this for 0.10 at this stage.... If you have 0.10.x then upgrade!


Add/Change #3051 (Recaptcha support for comments)




Change Properties
Action