Fossil SCM
Clean up handling of concealed email addresses. This might be related to ticket [4b40f574494].
Commit
3c851ca7600b5cab8f386c28bc450e16948485d6
Parent
dc09f0943283ed7…
2 files changed
+2
-2
+2
-4
M
src/db.c
+2
-2
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -907,12 +907,12 @@ | ||
| 907 | 907 | sha1sum_step_text(zContent, n); |
| 908 | 908 | sha1sum_finish(&out); |
| 909 | 909 | strcpy(zHash, blob_str(&out)); |
| 910 | 910 | blob_reset(&out); |
| 911 | 911 | db_multi_exec( |
| 912 | - "INSERT OR IGNORE INTO concealed VALUES(%Q,%Q)", | |
| 913 | - zHash, zContent | |
| 912 | + "INSERT OR IGNORE INTO concealed VALUES(%Q,%#Q)", | |
| 913 | + zHash, n, zContent | |
| 914 | 914 | ); |
| 915 | 915 | return zHash; |
| 916 | 916 | } |
| 917 | 917 | |
| 918 | 918 | /* |
| 919 | 919 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -907,12 +907,12 @@ | |
| 907 | sha1sum_step_text(zContent, n); |
| 908 | sha1sum_finish(&out); |
| 909 | strcpy(zHash, blob_str(&out)); |
| 910 | blob_reset(&out); |
| 911 | db_multi_exec( |
| 912 | "INSERT OR IGNORE INTO concealed VALUES(%Q,%Q)", |
| 913 | zHash, zContent |
| 914 | ); |
| 915 | return zHash; |
| 916 | } |
| 917 | |
| 918 | /* |
| 919 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -907,12 +907,12 @@ | |
| 907 | sha1sum_step_text(zContent, n); |
| 908 | sha1sum_finish(&out); |
| 909 | strcpy(zHash, blob_str(&out)); |
| 910 | blob_reset(&out); |
| 911 | db_multi_exec( |
| 912 | "INSERT OR IGNORE INTO concealed VALUES(%Q,%#Q)", |
| 913 | zHash, n, zContent |
| 914 | ); |
| 915 | return zHash; |
| 916 | } |
| 917 | |
| 918 | /* |
| 919 |
+2
-4
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -404,14 +404,12 @@ | ||
| 404 | 404 | while( nValue>0 && isspace(zValue[nValue-1]) ){ nValue--; } |
| 405 | 405 | if( strncmp(azField[i], "private_", 8)==0 ){ |
| 406 | 406 | zValue = db_conceal(zValue, nValue); |
| 407 | 407 | nValue = strlen(zValue); |
| 408 | 408 | } |
| 409 | - if( strncmp(zValue, azValue[i], nValue) | |
| 410 | - || strlen(azValue[i])!=nValue ){ | |
| 411 | - blob_appendf(&tktchng, "J %s %z\n", | |
| 412 | - azField[i], fossilize(zValue,nValue)); | |
| 409 | + if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){ | |
| 410 | + blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); | |
| 413 | 411 | } |
| 414 | 412 | } |
| 415 | 413 | } |
| 416 | 414 | } |
| 417 | 415 | if( *(char**)pUuid ){ |
| 418 | 416 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -404,14 +404,12 @@ | |
| 404 | while( nValue>0 && isspace(zValue[nValue-1]) ){ nValue--; } |
| 405 | if( strncmp(azField[i], "private_", 8)==0 ){ |
| 406 | zValue = db_conceal(zValue, nValue); |
| 407 | nValue = strlen(zValue); |
| 408 | } |
| 409 | if( strncmp(zValue, azValue[i], nValue) |
| 410 | || strlen(azValue[i])!=nValue ){ |
| 411 | blob_appendf(&tktchng, "J %s %z\n", |
| 412 | azField[i], fossilize(zValue,nValue)); |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | } |
| 417 | if( *(char**)pUuid ){ |
| 418 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -404,14 +404,12 @@ | |
| 404 | while( nValue>0 && isspace(zValue[nValue-1]) ){ nValue--; } |
| 405 | if( strncmp(azField[i], "private_", 8)==0 ){ |
| 406 | zValue = db_conceal(zValue, nValue); |
| 407 | nValue = strlen(zValue); |
| 408 | } |
| 409 | if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){ |
| 410 | blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); |
| 411 | } |
| 412 | } |
| 413 | } |
| 414 | } |
| 415 | if( *(char**)pUuid ){ |
| 416 |