Skip to content
Snippets Groups Projects
Commit da90e11b authored by rswindell's avatar rswindell
Browse files

Fix folded header field parsing bug in parse_msg_header(), if the folded data

portion contained a colon, it would be interpretted as a new header field.
parent 709c2627
Branches
Tags
No related merge requests found
......@@ -20,7 +20,7 @@ function parse_msg_header(msgtxt)
for(i in msgtxt) {
if(msgtxt[i].length==0) // Header terminator
break;
var match = msgtxt[i].match(/(\S+)\s*:\s*(.*)/);
var match = msgtxt[i].match(/^(\S+)\s*:\s*(.*)/);
if(match)
hdr[last_field=match[1].toLowerCase()]=match[2];
else if(last_field) // Folded header field
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment