Modify

Opened 15 months ago

Last modified 4 days ago

#11200 new enhancement

New user and hacks pages should be passed through the spam filter

Reported by: rjollos Owned by: rjollos
Priority: normal Component: TracHacksPlugin
Severity: normal Keywords:
Cc: hasienda, stoecker Trac Release:

Description

I have looked into this myself so I'm fuzzy on the details, but stoecker mentioned over email that the new user pages aren't passing through the SpamFilter. I have to assume that the same is true for NewHack pages.

Attachments (0)

Change History (2)

comment:1 Changed 6 weeks ago by rjollos

See also #11742.

comment:2 Changed 4 days ago by stoecker

Creating a Adapter for NewHacks is easy. Simply call

FilterSystem(self.env).test(req, author, changes)

where "author" is an author name and changes a list of before/after strings. For NewHack the before is probably always None.

Examples here: http://trac.edgewall.org/browser/plugins/1.0/spam-filter/tracspamfilter/adapters.py and here: http://trac.edgewall.org/browser/plugins/1.0/spam-filter/tracspamfilter/accountadapter.py

See examples how to extract author name.

Best is to encapsulate the code, so that it only is called when spam-filter exists.

Last edited 4 days ago by stoecker (previous) (diff)

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.