Changes between Initial Version and Version 1 of smo/trac-redact


Ignore:
Timestamp:
Jan 3, 2011, 4:35:56 PM (15 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • smo/trac-redact

    v1 v1  
     1= How do I redact a password or other sensitive info from a ticket? =
     2
     3Note: this process will change after upgrading to Postgres (see ticket #3716).
     4
     5The trac installation is on moses.mayfirst.org.
     6
     7Begin by logging into moses:
     8
     9{{{
     10ssh root@moses.mayfirst.org
     11}}}
     12
     13Then, open the database:
     14
     15{{{
     16sqlite3 /srv/trac/support/db/trac.db
     17}}}
     18
     19The 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.
     20
     21If you are redacting the body of an initial ticket, try:
     22
     23{{{
     24 UPDATE ticket SET description = REPLACE(description,'THING_TO_REPLACE','xxxxxx') where id = TICKET_NUMBER;
     25}}}
     26
     27If you are redacting an ticket comment try:
     28
     29{{{
     30 UPDATE ticket_change SET newvalue = REPLACE(newvalue,'THING_TO_REPLACE','xxxxxxxx') where ticket = TICKET_NUMBER;
     31}}}
     32
     33When you are done type:
     34
     35{{{
     36.quit
     37}}}