Modify

Opened 16 years ago

Closed 13 years ago

Last modified 12 years ago

#3051 closed enhancement (worksforme)

Recaptcha support for comments

Reported by: Artem Egorkine Owned by: 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 (2)

addcomment-0.10-r3699-repatcha.patch (9.1 KB) - added by Artem Egorkine 16 years ago.
recaptcha support for Trac-0.10 version of AddCommentMacro
repatcha-screenshot.png (97.7 KB) - added by Artem Egorkine 16 years ago.
Screenshot of the recaptcha-enabled AddCommentMacro in action.

Download all attachments as: .zip

Change History (12)

Changed 16 years ago by Artem Egorkine

recaptcha support for Trac-0.10 version of AddCommentMacro

Changed 16 years ago by Artem Egorkine

Attachment: repatcha-screenshot.png added

Screenshot of the recaptcha-enabled AddCommentMacro in action.

comment:1 Changed 16 years ago by Thomas Moschny

See also #3076.

comment:2 Changed 16 years ago by Christian Boos

Owner: changed from Christian Boos to anonymous

(I'm not in charge of this plugin)

comment:3 Changed 16 years ago by anonymous

How do you install this onto your own trac?

comment:4 Changed 16 years ago by anonymous

Owner: changed from anonymous to Alec Thomas

comment:5 Changed 16 years ago by Alec Thomas

Owner: changed from Alec Thomas to osimons

I think osimons is maintaining this plugin now.

comment:6 in reply to:  5 ; Changed 16 years ago 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...

comment:7 in reply to:  6 Changed 16 years ago by Artem Egorkine

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...

comment:8 Changed 16 years ago by Thomas Moschny

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

comment:9 in reply to:  8 Changed 16 years ago 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?

comment:10 Changed 13 years ago by osimons

Resolution: worksforme
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.