HiraokaHyperTools / msgreader

40 stars 9 forks source link

Filenames contained by the msg file ending with a whitespace will throw an error #4

Closed Eleos91 closed 1 year ago

Eleos91 commented 4 years ago

If one of the filenames contained by the msg file ends with a whitespace, the msg file can not be extracted and throws one of two possible errors: TypeError: Cannot read property 'name' of undefined or TypeError: Cannot read property 'split' of undefined

kenjiuno commented 4 years ago

@Eleos91 Hi thanks for reporting this! Is there any sample MSG containing the problematic filenames. I want to reproduce it...

kenjiuno commented 4 years ago

Ok cygwin could make such a file in my Windows 10!

KU@H270 ~/trailing-space
$ touch "a.txt   "

KU@H270 ~/trailing-space
$ ls -l
合計 0
-rw-r--r-- 1 KU KU 0 5月  12 14:32 'a.txt   '
kenjiuno commented 4 years ago

I have made sample mails for repro: trailing-space-eml-and-msg.zip

kenjiuno commented 4 years ago

If one of the filenames contained by the msg file ends with a whitespace, the msg file can not be extracted and throws one of two possible errors:

What's the expected behavior on msgreader?

msgreader can extract attachment files having trailing space file name like trailing-space.txt on Windows 10. However majority programs fail to access the file trailing-space.txt.

In another side, Outlook 2013 seems to rename the not valid names forcefully by attaching _ at trailing.

2020-05-12_19h27_08

This is the behavior you will expect on msgreader?

Eleos91 commented 4 years ago

I can not share the samples (in total 48 samples) that can replicate the issue because those .mgs files are sensitive data. The sample you provided actually doesn't throw an error... When I find some time, i will investigate those files a bit more and try to replicate the error with a self made .msg file i can share with you

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.