Opened 7 years ago

Closed 5 years ago

#5536 closed Bug/Something is broken (fixed)

easier pruning of ticket comments

Reported by: Daniel Kahn Gillmor Owned by: Joseph
Priority: Medium Component: Tech
Keywords: spam support.mayfirst.org chelsea.mayfirst.org rose.mayfirst.org Cc:
Sensitive: no

Description

we just got our first spam comment here on this ticketing system (previous spam had been entire tickets or wiki edits).

I removed the spam comment by fiddling with the postgresql backend, but it would be nice to make a simple reversion easier to do.

We may also want to consider some sort of spam filtering on comments as well; yuck.

Attachments (1)

ticket_comment-remove.patch (1.2 KB) - added by Daniel Kahn Gillmor 7 years ago.
the patch currently applied to moses's trac installation

Download all attachments as: .zip

Change History (18)

comment:2 Changed 7 years ago by Daniel Kahn Gillmor

Owner: set to Daniel Kahn Gillmor
Status: newassigned

This sets the state

comment:4 Changed 7 years ago by Daniel Kahn Gillmor

Resolution: fixed
Status: assignedclosed

I just submitted a patch for trac to enable ticket comment removal from trac-admin . I've applied that patch to the trac instance on moses; hopefully it'll make its way upstream sooner rather than later.

so now, if a bogus comment number C shows up on ticket number T, as root@moses you can do:

su - www-data -c 'trac-admin /srv/trac/support ticket_comment remove T C'

As always when operating in this mode, be careful -- mistakes can make the system lose data.

Last edited 7 years ago by Daniel Kahn Gillmor (previous) (diff)

Changed 7 years ago by Daniel Kahn Gillmor

Attachment: ticket_comment-remove.patch added

the patch currently applied to moses's trac installation

comment:5 Changed 7 years ago by Ross

Resolution: fixed
Status: closedassigned

This is really awesome dkg! At some point it would be cool to have it in the web UI. How difficult would such a thing be to accomplish?

comment:6 Changed 7 years ago by Ross

Owner: changed from Daniel Kahn Gillmor to Ross

comment:7 Changed 7 years ago by Ross

Keywords: f2f added

comment:8 Changed 7 years ago by Daniel Kahn Gillmor

It's straightforward to add it to the web UI by setting tracopt.ticket.deleter = enabled in the [components] section of trac.ini and granting TICKET_ADMIN privileges to users who you want to have access to this potentially-destructive feature.

TICKET_ADMIN brings with it a whole bunch of other potentially-destructive features as well. Fun for the whole family!

I'm not convinced that we want to expose such features through the web UI.

comment:9 Changed 7 years ago by Ross

Resolution: fixed
Status: assignedclosed

Decided not to have this as part of the UI.

comment:10 Changed 7 years ago by Ross

Keywords: f2f removed

comment:11 Changed 7 years ago by Daniel Kahn Gillmor

If you want prompting, please use mf-smo-remove-ticket as documented in #5549:

0 moses:~# su - www-data -c 'mf-smo-remove-ticket 3045 11'
About to remove comment 11 from ticket 3045
   https://support.mayfirst.org/ticket/3045#comment:11
Proceed with comment deletion? [y/N] y
Comment #11 of Ticket #3045 removed.
0 moses:~# 

comment:12 Changed 5 years ago by Jamie McClelland

Resolution: fixed
Status: closedassigned

Dana and I tried to use this trick, but the command is not found. Perhaps we have upgraded trac and lost the patch?

Could this be re-applied to the current version? This is in regard to deleting comment 2 from #8008 (currently marked sensitive, so no hurry).

jamie

comment:13 Changed 5 years ago by Daniel Kahn Gillmor

Owner: changed from Ross to Daniel Kahn Gillmor

i'll try to sort this out.

comment:14 Changed 5 years ago by Daniel Kahn Gillmor

indeed, we lost the patch for this during our upgrade to 1.0.1. I've prepared a new version of trac based on the wheezy-backports version of trac, which i'm planning to upload to apt.mayfirst.org.

comment:15 Changed 5 years ago by Daniel Kahn Gillmor

My one concern about pushing it to apt.mayfirst.org is that it might cause a trac upgrade on other mf/pl servers that are currently running trac 0.12.5 from stock wheezy. do we know which servers that might be?

looks like chelsea.mayfirst.org might be one, but i see no files named trac.ini in /home/members so i don't think anyone has an active deployment on that server.

Last edited 5 years ago by Daniel Kahn Gillmor (previous) (diff)

comment:16 Changed 5 years ago by Daniel Kahn Gillmor

Owner: changed from Daniel Kahn Gillmor to Ross

the updated package has been applied to moses, and ticket comment removal functionality is now restored there. The updated packaging is in moses:/root/tickets/5536/ and published at the wheezy-mfpl branch on git://lair.fifthhorseman.net/~dkg/trac, but I'm still not sure whether i should be pushing it to apt.mayfirst.org.

Ross, i'm reassigning this to you for consideration about whether i should go ahead with uploading the package to the wheezy-mfpl apt.mayfirst.org repository. I think it's worth doing (we should be able to support it since it's in wheezy-backports anyway) but i want to make sure someone else has thought through the consequences as well rather than just deciding on my own. Maybe you can come up with a list of mfpl wheezy servers with the trac package installed as an audit check?

feel free to reassign to me when you've evaluated the situation, or reassign to someone else if you'd rather not evaluate it yourself. thanks!

comment:17 Changed 5 years ago by Daniel Kahn Gillmor

Owner: changed from Ross to Daniel Kahn Gillmor

In discussion at the f2f we decided it was reasonable to push the package to wheezy-mfpl, so i've pushed it.

comment:18 Changed 5 years ago by Daniel Kahn Gillmor

Keywords: chelsea.mayfirst.org rose.mayfirst.org added
Owner: changed from Daniel Kahn Gillmor to Joseph

I just upgraded chelsea to the new version of trac via our repos; rose is the other one that needs consideration -- apparently there are some trac installations on rose that might need to be reviewed. i'm reassigning to joseph because he's the "parent" of rose, for handling the upgrades there.

comment:19 Changed 5 years ago by Joseph

Resolution: fixed
Status: assignedclosed

I found four trac instances on rose. After upgrading trac on rose, we updated the databases and documentation associated with each. I emailed the contact for each member to let them know.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.