Fossil SCM

Clean up handling of concealed email addresses. This might be related to ticket [4b40f574494].

drh 2008-07-24 14:48 trunk
Commit 3c851ca7600b5cab8f386c28bc450e16948485d6
2 files changed +2 -2 +2 -4
+2 -2
--- src/db.c
+++ src/db.c
@@ -907,12 +907,12 @@
907907
sha1sum_step_text(zContent, n);
908908
sha1sum_finish(&out);
909909
strcpy(zHash, blob_str(&out));
910910
blob_reset(&out);
911911
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
914914
);
915915
return zHash;
916916
}
917917
918918
/*
919919
--- 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 @@
404404
while( nValue>0 && isspace(zValue[nValue-1]) ){ nValue--; }
405405
if( strncmp(azField[i], "private_", 8)==0 ){
406406
zValue = db_conceal(zValue, nValue);
407407
nValue = strlen(zValue);
408408
}
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);
413411
}
414412
}
415413
}
416414
}
417415
if( *(char**)pUuid ){
418416
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button