ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.16k stars 157 forks source link

Import-Export tool (and Proton-Bridge) message corruption on large scale uncovered 2 #147

Closed exander77 closed 3 years ago

exander77 commented 3 years ago

The same problem as https://github.com/ProtonMail/proton-bridge/issues/146 seems to occur with the long To: header where there is a new line in display-name. The whole To: header was lost and part of headers ended up in the part of the body.

There is most certainly a problem in parsing during the header separation.

jameshoulahan commented 3 years ago

go-message's handling of newlines in header entries is an ongoing problem for us. It also causes problems for us when attachment filenames, for instance, are linewrapped. I wonder if this is yet another such problem.

Do you have an example you could share?

exander77 commented 3 years ago

@jameshoulahan Maybe I was wrong about the assumption that it is due to line wrap as the header is extremely long as well as with the other case (several messages I inspected were Christmas wishes and large group emails with many recipients). Or it can be a combination of both? Line wrap and long headers.

I will remigrate my e-mails and I will log all the messages without Date or Subject just to be sure. I found all of these on the server by accident actually when I was removing e-mails by that and there were a lot of messages with Date of the migration and empty Subject and when I opened them it was evident that part of headers ended up in a body.

andrzejsza commented 3 years ago

all the related dev was done as part of #146.