View Issue Details

IDProjectCategoryView StatusLast Update
0005788SOGoActiveSyncpublic2023-10-04 13:07
ReporterMichele Giacomoli Assigned Toqhivert  
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionreopened 
Product Version5.8.3 
Fixed in Version5.9.0 
Summary0005788: Bug in libytnef0 causes ActiveSync to fail sync when files in winmail.dat file have long filename
Description

As per 0005729 libytnef0 has a too strict limit for filenames too, causing ytnef to fail parsing winmail.dat file with attachments with filename longer than 100 bytes. According to Microsoft documentation (https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry) max filename size is usually 256 bytes, 260 for max filepath. I've already prepared a patch and proposed it for merging in ytnef repo https://github.com/Yeraze/ytnef/pull/106

Steps To Reproduce

Generate a winmail.dat with a file with name longer than 100 bytes inside it. Then to parse it with libytnef0 or with ytnef tool

TagsNo tags attached.

Activities

sebastien

sebastien

2023-06-13 19:46

administrator   ~0017020

Thank you for reporting, this is an issue on libytnef. The only action on SOGo is updating library once merged.

I close this one.

Sebastien

Michele Giacomoli

Michele Giacomoli

2023-06-14 08:29

reporter   ~0017022

Hi @sebastien.
Reopened just to notify you the patch has already been merged

sebastien

sebastien

2023-06-14 08:47

administrator   ~0017023

Thank you !

qhivert

qhivert

2023-06-14 09:08

administrator   ~0017024

Hello ! Could you provide us a winmail.dat file so we could test it ?

Michele Giacomoli

Michele Giacomoli

2023-06-14 15:45

reporter   ~0017028

Uhm, maybe I'm wrong, but it seems I cannot upload anything as the issue is closed :-/

Michele Giacomoli

Michele Giacomoli

2023-06-14 15:46

reporter   ~0017029

Ok, now I can upload the winmail.dat file, sorry for the duplicate note

winmail.dat (28,229 bytes)
qhivert

qhivert

2023-06-14 15:58

administrator   ~0017030

Ok thank you ! We will let you know when we will upatde ytnef

qhivert

qhivert

2023-06-20 09:06

administrator   ~0017059

Hello,
Have you tested ytnef with the file you provide ?
I build ytnef with your fix but can't parse your file somehow.

ytnef_failed.png (6,670 bytes)   
ytnef_failed.png (6,670 bytes)   
Michele Giacomoli

Michele Giacomoli

2023-06-20 10:55

reporter   ~0017061

The winmail.dat file i had problem with at the beginning contained reserved data I couldn't publish, so I had to do some tries in order to have Outlook to create a winmail.dat with some other attachments. The only way I found was to also insert a poll into the mail, and maybe the "Request Response [2]" you are seeing is about that empty poll.
I focused on having the library to extract the attachments without errors, so you can check with the command "ytnef -F -f . winmail.dat". If someone can provide me a "normal" winmail.dat I can check the ytnef -v output differences between that winmail.dat and mine.
Otherwise you can check by yourself with any winmail.dat you manage to create with an attachment with a filename longer than 100 chars

qhivert

qhivert

2023-06-20 12:42

administrator   ~0017063

Last edited: 2023-06-20 12:43

Ok just want te be sure it was not on my side.

I've made a .dat with a attachment'name over 100 chars and confirm it works with your fix but not without. I've asked Yeraze to make a new release of ytnef bedore we can make our own packages.

noname.dat (26,337 bytes)
qhivert

qhivert

2023-07-13 07:35

administrator   ~0017112

Hello the new version of ytnef 2.1.2 has been published in our repos.
Let me know if there are any problems to install it.

Issue History

Date Modified Username Field Change
2023-06-13 17:09 Michele Giacomoli New Issue
2023-06-13 19:46 sebastien Note Added: 0017020
2023-06-13 19:46 sebastien Assigned To => sebastien
2023-06-13 19:46 sebastien Status new => closed
2023-06-13 19:46 sebastien Resolution open => fixed
2023-06-14 08:29 Michele Giacomoli Status closed => feedback
2023-06-14 08:29 Michele Giacomoli Resolution fixed => reopened
2023-06-14 08:29 Michele Giacomoli Note Added: 0017022
2023-06-14 08:47 sebastien Note Added: 0017023
2023-06-14 08:48 sebastien Status feedback => closed
2023-06-14 09:08 qhivert Note Added: 0017024
2023-06-14 15:45 Michele Giacomoli Status closed => feedback
2023-06-14 15:45 Michele Giacomoli Note Added: 0017028
2023-06-14 15:46 Michele Giacomoli Note Added: 0017029
2023-06-14 15:46 Michele Giacomoli File Added: winmail.dat
2023-06-14 15:46 Michele Giacomoli Status feedback => assigned
2023-06-14 15:58 qhivert Note Added: 0017030
2023-06-20 09:06 qhivert Note Added: 0017059
2023-06-20 09:06 qhivert File Added: ytnef_failed.png
2023-06-20 09:06 qhivert Status assigned => feedback
2023-06-20 10:55 Michele Giacomoli Note Added: 0017061
2023-06-20 10:55 Michele Giacomoli Status feedback => assigned
2023-06-20 12:40 qhivert Assigned To sebastien => qhivert
2023-06-20 12:42 qhivert Note Added: 0017063
2023-06-20 12:42 qhivert File Added: noname.dat
2023-06-20 12:43 qhivert Note Edited: 0017063
2023-07-13 07:35 qhivert Status assigned => feedback
2023-07-13 07:35 qhivert Note Added: 0017112
2023-07-17 07:13 sebastien Status feedback => resolved
2023-07-17 07:13 sebastien Fixed in Version => 5.9.0
2023-10-04 13:07 qhivert Status resolved => closed