Opened 11 years ago

Closed 7 years ago

Last modified 9 months ago

#11200 closed enhancement (fixed)

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

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: TracHacksPlugin
Severity: normal Keywords:
Cc: Steffen Hoffmann, Dirk Stöcker Trac Release:


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 (6)

comment:1 Changed 10 years ago by Ryan J Ollos

See also #11742.

comment:2 Changed 10 years ago by Dirk Stöcker

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.


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 7 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 8 years ago by Ryan J Ollos

Status: newaccepted

comment:4 Changed 7 years ago by Ryan J Ollos

In 16630:

TracHacks 3.0.5: Put database transaction in a context manager

Remove code for rolling back transaction. The database
transaction are now atomic, and if those succeed there is
not much that can go wrong in adding the repository
path and the ACL entry.

Refs #11200.

comment:5 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16632:

TracHacks 3.0.5: Pass new hacks through the spam filter

  • Use of SpamFilter is still optional
  • Remove test code and unintentional change from r16630

Fixes #11200.

comment:6 Changed 7 years ago by Ryan J Ollos

Tested deployment in r16633, r16634.

Last edited 7 years ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
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.