Closed
Bug 457539
Opened 17 years ago
Closed 17 years ago
generated md5 message-ids are dodgy
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.1b2
People
(Reporter: tuukka.tolvanen, Assigned: tuukka.tolvanen)
References
()
Details
Attachments
(2 files, 1 obsolete file)
1.51 KB,
patch
|
Details | Diff | Splinter Review | |
1.91 KB,
patch
|
Bienvenu
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
http://mxr.mozilla.org/comm-central/source/mailnews/local/src/nsParseMailbox.cpp#1393 takes hashy-random signed chars as unsigned ints and prints those in hex to generate a message-id when missing, so instead of hh you get hh half of the time and FFFFFFhh the rest.
fgrep -r md5: ~/.thunderbird/*.default/ | sed -r 's/.*md5:([0-9A-F]*).*/\1/'
FFFFFF96FFFFFFB36555FFFFFFD9031123FFFFFFEA48
FFFFFFB5FFFFFF9525FFFFFFA33BFFFFFFE4FFFFFF84
FFFFFFA7FFFFFFB12CFFFFFFB54C303978FFFFFFF82C
5919206CFFFFFFBC0045FFFFFFE722FFFFFFCA78454B
...
you do get 5 random bytes at minimum regardless, and very few messages need a generated id, so this shouldn't be much of a practical issue; it just looked rather suspicious in gloda indexing spew...
Assignee | ||
Comment 1•17 years ago
|
||
this would be the minimal fix
Assignee: nobody → tuukka.tolvanen
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•17 years ago
|
||
...but I think I prefer just asking the hasher for the digest in base64; it's less code here. The output is then like <md5:WJxiZHD5646NgCdiR7DQPw==> (base64 is [A-Z][a-z][/+] with a bit of '=' sprinkled on top; I have all of those chars in my incoming mail message-ids).
Attachment #340801 -
Flags: superreview?(bienvenu)
Attachment #340801 -
Flags: review?(bienvenu)
Assignee | ||
Comment 3•17 years ago
|
||
...and let's not forget to keep the variable name in sync with that change
Attachment #340801 -
Attachment is obsolete: true
Attachment #340802 -
Flags: superreview?(bienvenu)
Attachment #340802 -
Flags: review?(bienvenu)
Attachment #340801 -
Flags: superreview?(bienvenu)
Attachment #340801 -
Flags: review?(bienvenu)
Comment 4•17 years ago
|
||
Comment on attachment 340802 [details] [diff] [review]
patch3 s/md5_bin/md5_b64/
thx for the patch.
Attachment #340802 -
Flags: superreview?(bienvenu)
Attachment #340802 -
Flags: superreview+
Attachment #340802 -
Flags: review?(bienvenu)
Attachment #340802 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 5•17 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
You need to log in
before you can comment on or make changes to this bug.
Description
•