Skip to content
Snippets Groups Projects
Commit 6e8bb343 authored by deuce's avatar deuce
Browse files

Fix boundary regex.

parent 5c2419e8
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,8 @@ function mime_decode(hdr, body)
return(Message);
}
if(CT.search(/multipart\/[^\s;]*/i)!=-1) {
var bound=CT.match(/;\s*boundary="?([^;\r\n]*?)"?/);
var bound=CT.match(/;[ \r\n]*boundary="{0,1}([^";\r\n]*)"{0,1}/);
write("CT: "+CT+" Match: "+bound[0]+" Bound: "+bound[1]);
re=new RegExp ("--"+bound[1]);
msgbits=body.split(re);
/* Search for attachments */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment