Diff
Not logged in

Differences From:

File src/rebuild.c part of check-in [cfb1341ae3] - Fix an assert in the rebuild command. by drh on 2008-06-02 09:54:38. [view]

To:

File src/rebuild.c part of check-in [f46fe42d6d] - Store private ticket fields (ex: the originators email address) as their SHA1 hash so that malefactors cannot read them. Add the new "concealed" table to the repository database and store mappings from SHA1 hashes back to email addresses in that table. Ticket a24ec6005f. Note: run "rebuild" on repositories after updating to this version of fossil in order to create the "concealed" table. Need to add the ability to manage the concealed table from the web interface and the ability to sync concealed content between trusted repositories. by drh on 2008-07-24 02:04:36. [view]

@@ -61,8 +61,21 @@
 @    title text,              -- Title of this report
 @    cols text,               -- A color-key specification
 @    sqlcode text             -- An SQL SELECT statement for this report
 @ );
+@
+@ -- Some ticket content (such as the originators email address or contact
+@ -- information) needs to be obscured to protect privacy.  This is achieved
+@ -- by storing an SHA1 hash of the content.  For display, the hash is
+@ -- mapped back into the original text using this table.
+@ --
+@ -- This table contains sensitive information and should not be shared
+@ -- with unauthorized users.
+@ --
+@ CREATE TABLE IF NOT EXISTS concealed(
+@   hash TEXT PRIMARY KEY,
+@   content TEXT
+@ );
 ;
 
 /*
 ** Variables used for progress information
@@ -179,9 +192,10 @@
     zTable = db_text(0,
        "SELECT name FROM sqlite_master"
        " WHERE type='table'"
        " AND name NOT IN ('blob','delta','rcvfrom','user',"
-                         "'config','shun','private','reportfmt')"
+                         "'config','shun','private','reportfmt',"
+                         "'concealed')"
     );
     if( zTable==0 ) break;
     db_multi_exec("DROP TABLE %Q", zTable);
     free(zTable);