wiki:smo/trac-redact

Version 4 (modified by Ross, 9 years ago) (diff)

who searches for redact?

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

The trac installation is on moses.mayfirst.org.

Begin by logging into moses and connecting to the database:

ssh -t root@moses.mayfirst.org "su - www-data -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:

\q

to log out.