Version 5 (modified by Daniel Kahn Gillmor, 10 years ago) (diff)


How do I redact, edit, remove, or delete a password or other sensitive info from a ticket?

The trac installation is on

Begin by logging into moses and connecting to the database:

ssh -t "su - supportdb -c 'psql support'"

The SQL statement to execute depends on whether the string you want to redact is in the original ticket or in a comment. In both cases below, replace THING_TO_REPLACE with the actual private string to redact and replace TICKET_NUMBER with the number of the ticket.

If you are redacting the body of an initial ticket, try:

 UPDATE ticket SET description = REPLACE(description,'THING_TO_REPLACE','xxxxxx') where id = TICKET_NUMBER;

If you are redacting an ticket comment try:

 UPDATE ticket_change SET newvalue = REPLACE(newvalue,'THING_TO_REPLACE','xxxxxxxx') where ticket = TICKET_NUMBER;

When you are done type:


to log out.