move processMultiPartEncryptedSubtype to process/format
ClosedPublic

Authored by knauss on Oct 29 2015, 11:45 AM.

Details

Reviewers
vkrause
Group Reviewers
KDE PIM
Maniphest Tasks
T719: Refactor objecttreeparser

Diff Detail

Repository
R43 KDE PIM
Lint
No Linters Available
Unit
No Unit Test Coverage
knauss updated this revision to Diff 1087.Oct 29 2015, 11:45 AM
knauss retitled this revision from to move processMultiPartEncryptedSubtype to process/format.
knauss updated this object.
knauss edited the test plan for this revision. (Show Details)
knauss added a reviewer: vkrause.
knauss added a project: KDE PIM.

two branches are left without tests and I don't know how to reach them.

messageviewer/src/viewer/objecttreeparser.cpp
1225

I tried very long to reach this if, but failed, because also an empty content is parsed as one child from kmime side.

Any idea of a email structure to reach this one?

1256

This brancxh I also don't reach.

I tried the following but this results in the complete bbbb part as data without any subchilds. Only if I process the data part explitly as KMime::Message(data->decodedContent()) this has childs:

MIME-Version: 1.0
Content-Type: multipart/encrypted; boundary="aaaa"
Content-Transfer-Encoding: 7Bit


--aaaa
Content-Transfer-Encoding: 7Bit
Content-Type: application/pgp-encrypted

Version 1
--aaaa
Content-Type: application/octet-stream

MIME-Version: 1.0
Content-Type: random/content; boundary="bbbb"
Content-Transfer-Encoding: 7Bit


--bbbb
Content-Type: application/foo

asdfghjkl
--bbbb
Content-Type: application/octet-stream

qwertzuiop
--bbbb--

--aaaa--
vkrause accepted this revision.Oct 31 2015, 11:12 AM
vkrause edited edge metadata.

Looks ok to me. It's quite possible that these branches were actually just routine defensive checks against nullptr, or go back to mimelib behavior before we ported to KMime, ie. asserts there are probably ok.

This revision is now accepted and ready to land.Oct 31 2015, 11:12 AM
knauss closed this revision.Nov 4 2015, 7:09 PM

pushed