mikel / tmail

TMail is a Ruby Email Handler.
http://tmail.rubyforge.org/
Other
73 stars 36 forks source link

wrong behaviour with last boundary in TMail::Mail#read_multipart #12

Open erroric opened 12 years ago

erroric commented 12 years ago

Hi, i've found issue with the multipart messages and its last boundary. Some mail generators loose CR LF after the last boundary, and TMail does accept it as a part of content.

Problem is in a is_sep Regexp, there is an example of correct one:

/\A--#{Regexp.quote bound}(?:--[ \t](?:\n|\r\n|\r|\z)|[ \t](?:\n|\r\n|\r))/