You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2022/11/02 11:27:33 UTC

[Bug 66335] New: PtypGuid 0x0048 is a linked property but is read from property file

https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

            Bug ID: 66335
           Summary: PtypGuid 0x0048 is a linked property but is read from
                    property file
           Product: POI
           Version: unspecified
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: HSMF
          Assignee: dev@poi.apache.org
          Reporter: swagner@faw.at
  Target Milestone: ---

The Type CLS_ID has a length of 16 bytes, however according to
https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxmsg/08185828-e9e9-4ef2-bcd2-f6e69c00891b
0x0048 (PtypGuid) is not inside the properties stream itself.

Whenever there is a Type 0048 it screws up reading the properties after this.

for example:
....
0B 00 55 36 06 00 00 00 01 00 00 00 00 00 00 00 
48 00 01 80 06 00 00 00 10 00 00 00 03 00 00 00 
0B 00 45 36 06 00 00 00 01 00 00 00 00 00 00 00
...

line 1 - type is 00 0b with property 36 55 and flag 00 00 00 06 and the data 00
00 00 00 00 00 00 00
line 2 - type is 00 48 with property 06 80 and flag 00 00 00 06 and the data is
found in __substg1.0_80010048
line 3 - type is 00 0b with property 36 45 and flag 00 00 00 06 and the data 00
00 00 00 00 00 00 00

the current implementation reads 16 bytes for type 00 48, which reads half the
next line and screws up everything after that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by Kamal Chandrashekar <sa...@gmail.com>.
On Sun, 6 Nov 2022 at 21:00, Kamal Chandrashekar <sa...@gmail.com>
wrote:

> bettergo with java hashmap id,string(multi value).
>
> On Fri, 4 Nov 2022 at 02:34, <bu...@apache.org> wrote:
>
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=66335
>>
>> --- Comment #6 from Simon Wagner <sw...@faw.at> ---
>> So I refined my patch (since I found another bug with missing multi value
>> property types) and created a pull request
>> https://github.com/apache/poi/pull/396
>>
>> There I included a msg file which proves the benefits of my patch.
>>
>> Does that help?
>>
>> --
>> You are receiving this mail because:
>> You are the assignee for the bug.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
>> For additional commands, e-mail: dev-help@poi.apache.org
>>
>>

Re: [Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by Kamal Chandrashekar <sa...@gmail.com>.
bettergo with java hashmap id,string(multi value).

On Fri, 4 Nov 2022 at 02:34, <bu...@apache.org> wrote:

> https://bz.apache.org/bugzilla/show_bug.cgi?id=66335
>
> --- Comment #6 from Simon Wagner <sw...@faw.at> ---
> So I refined my patch (since I found another bug with missing multi value
> property types) and created a pull request
> https://github.com/apache/poi/pull/396
>
> There I included a msg file which proves the benefits of my patch.
>
> Does that help?
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

--- Comment #6 from Simon Wagner <sw...@faw.at> ---
So I refined my patch (since I found another bug with missing multi value
property types) and created a pull request
https://github.com/apache/poi/pull/396

There I included a msg file which proves the benefits of my patch.

Does that help?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

--- Comment #4 from Simon Wagner <sw...@faw.at> ---
My goto example email contains sensitive information, which I can't share.

What I can share is the portion of the __properties_version1.0:
....
0B 00 55 36 06 00 00 00 01 00 00 00 00 00 00 00 
48 00 01 80 06 00 00 00 10 00 00 00 03 00 00 00 
0B 00 45 36 06 00 00 00 01 00 00 00 00 00 00 00
...

and the offical info from MS:
https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxmsg/08185828-e9e9-4ef2-bcd2-f6e69c00891b

This got fixed back in 2019 https://github.com/apache/poi/pull/143 but for some
reason the fix got "wrecked" by this commit
https://github.com/apache/poi/commit/2eee47406368fdcb016922aa0e6971b14926648f#diff-a987568b45a3a0bd3533ad69a9bf12d87b454008e43350b4eedfa31a4517fb60

It comes down to the fact, properties (which are included inside the
__properties_version1.0) cannot be longer than 8 bytes. Everything longer gets
stored in extra files. For the 2nd line above __substg1.0_80010048
So isFixedLength should be 
return (length != -1) && (length <= 8);
and NOT
return ((length != -1) && (length <= 8)) || (id == Types.CLS_ID.id);

I am really not sure what else I can provide. If you need more could you tell
me how to provide it to you?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

Simon Wagner <sw...@faw.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Simon Wagner <sw...@faw.at> ---
OK when I set this to resolved, since you added my MR from git?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by Kamal Chandrashekar <sa...@gmail.com>.
I have patched it to AWPL.

On Wed, 2 Nov 2022 at 21:31, <bu...@apache.org> wrote:

> https://bz.apache.org/bugzilla/show_bug.cgi?id=66335
>
> --- Comment #3 from PJ Fanning <fa...@yahoo.com> ---
> Thanks Simon.
>
> Unfortunately, I think we need a regression test. Do you have a a file that
> reproduces the issue and perhaps some code that parses the file? You don't
> necessarily need to provide fully working code - just enough to make it
> easy
> for me (or another POI committer) to get this over the line and merged.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

--- Comment #3 from PJ Fanning <fa...@yahoo.com> ---
Thanks Simon.

Unfortunately, I think we need a regression test. Do you have a a file that
reproduces the issue and perhaps some code that parses the file? You don't
necessarily need to provide fully working code - just enough to make it easy
for me (or another POI committer) to get this over the line and merged.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by Kamal Chandrashekar <sa...@gmail.com>.
Please share me the code i will try to see if i can fix it .it shd work in
all states.

On Wed, 2 Nov, 2022, 6:33 pm , <bu...@apache.org> wrote:

> https://bz.apache.org/bugzilla/show_bug.cgi?id=66335
>
> PJ Fanning <fa...@yahoo.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>            Severity|blocker                     |major
>                  OS|                            |All
>
> --- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
> Hi Simon - POI is a volunteer project, it might be more effective for you
> to
> try to fix this issue and submit a patch.
>
> There are very few active volunteers and fewer still that have experience
> with
> HSMF code base.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |major
                 OS|                            |All

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
Hi Simon - POI is a volunteer project, it might be more effective for you to
try to fix this issue and submit a patch.

There are very few active volunteers and fewer still that have experience with
HSMF code base.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |63955

--- Comment #5 from PJ Fanning <fa...@yahoo.com> ---
I'm not merging this without a test case. Someone else with experience of the
HSMF code base might look at this at some stage.


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=63955
[Bug 63955] HMEFContentsExtractor fails to extract content from winmail.dat
-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|HSMF                        |HMEF

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 66335] PtypGuid 0x0048 is a linked property but is read from property file

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66335

--- Comment #2 from Simon Wagner <sw...@faw.at> ---
Created attachment 38431
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38431&action=edit
A patch to fix it

I created the patch from the git source. I hope this works.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org