Modify

Opened 3 years ago

Last modified 3 months ago

#11200 accepted 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 (3)

comment:1 Changed 2 years ago by rjollos

See also #11742.

comment:2 Changed 2 years 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: trac:browser:plugins/1.0/spam-filter/tracspamfilter/adapters.py and here: trac: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 3 months ago by rjollos (previous) (diff)

comment:3 Changed 3 months ago by rjollos

  • Status changed from new to accepted

Add Comment

Modify Ticket

Action
as accepted The owner will remain rjollos.
Author


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

 
Note: See TracTickets for help on using tickets.