Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIED: Can't call method "head" on an undefined value #1454

Closed
djzhh opened this issue Jul 26, 2022 · 3 comments · Fixed by #1455
Closed

DIED: Can't call method "head" on an undefined value #1454

djzhh opened this issue Jul 26, 2022 · 3 comments · Fixed by #1455
Labels

Comments

@djzhh
Copy link

djzhh commented Jul 26, 2022

Version

6.2.60

Installation method

Puppet / yum:

perl-MIME-Charset.noarch 1.011.3-0.20141212.RHEL7 @sympa-ja.org
perl-MIME-EncWords.noarch 1.014.3-0.20141003.RHEL7 @sympa-ja.org
perl-Mail-DKIM.noarch 0.55-0.20190413.RHEL7 @sympa-ja.org
perl-libintl.x86_64 1.23-0.20140712.RHEL7 @sympa-ja.org
sympa.x86_64 6.2.60-1.el7 @epel
sympa-httpd.x86_64 6.2.60-1.el7 @epel

Expected behavior

Spool and send message.

Actual behavior

Sympa dies.

Jul 21 16:52:20 SYMPA-HOST sympa_msg[2215]: notice Sympa::Spindle::ProcessIncoming::_twist() Processing Sympa::Message <belle2@desy.de.1658413474.54403>; envelope_sender=andreas.gellrich@desy.de; message_id=519796AD-8248-4A6B-A420-8334FC2E4FAA@desy.de; sender=yves.kemp@desy.de

Jul 21 16:52:20 SYMPAHOST sympa_msg[2215]: info Sympa::Message::check_smime_signature() Sympa::Message <XXXX@YYYY.ZZ.1658413474.54403>: Unable to verify S/MIME signature: Crypt::SMIME#check: failed to check the signature: error:0D0D40D2:asn1 encoding routines:SMIME_read_ASN1:no multipart body failure at /usr/share/sympa/lib/Sympa/Message.pm line 1305.

Jul 21 16:52:20 SYMPAHOST sympa_msg[2215]: info Sympa::Spindle::DoMessage::_twist() Processing message Sympa::Message <XXXX@YYYY.ZZ.1658413474.54403> for Sympa::List <belle2@desy.de> with priority 5, <MSG-ID>

Jul 21 16:52:20 SYMPAHOST sympa_msg[2215]: err main::#243 > Sympa::Spindle::spin#95 > Sympa::Spindle::DoMessage::_twist#93 > Sympa::Spindle::DoMessage::_check_command#159 > Sympa::Message::get_plain_body#2480 > Sympa::Message::_as_singlepart#2549 > MIME::Entity::make_singlepart#1184 DIED: Can't call method "head" on an undefined value at /usr/share/perl5/vendor_perl/MIME/Entity.pm line 1184.

Steps to reproduce

Inject e-mail (reproducible) and SYMPA dies...

Additional information

Mail seems to be created by an Apple Mail client and is signed with S/MIME.

...
Content-Type: multipart/signed;
        boundary="Apple-Mail=_F11E6F9C-BEE4-43D1-8AA5-12D94EB037C6";
        protocol="application/pkcs7-signature";
        micalg=sha-256
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
...
X-Mailer: Apple Mail (2.3696.100.31)
...

--Apple-Mail=3D_F11E6F9C-BEE4-43D1-8AA5-12D94EB037C6
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
=09charset=3Dus-ascii

...mail content...


--Apple-Mail=3D_F11E6F9C-BEE4-43D1-8AA5-12D94EB037C6
Content-Disposition: attachment;
=09filename=3Dsmime.p7s
Content-Type: application/pkcs7-signature;
=09name=3Dsmime.p7s
Content-Transfer-Encoding: base64

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCCDk8=
w
ggbwMIIE2KADAgECAhEAqjJy7tobGaY39vJWKvTu8TANBgkqhkiG9w0BAQwFADCBiDELMAkGA1U=
E
BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQ=
K
ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWN=
h
dGlvbiBBdXRob3JpdHkwHhcNMjAwMjE4MDAwMDAwWhcNMzMwNTAxMjM1OTU5WjBPMQswCQYDVQQ=
G
EwJOTDEZMBcGA1UEChMQR0VBTlQgVmVyZW5pZ2luZzElMCMGA1UEAxMcR0VBTlQgZVNjaWVuY2U=
g
UGVyc29uYWwgQ0EgNDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAJWiST25HVQAlFw=
2
...
K9hdNwcn+Mze4tlCzDrVDgFYXH8WzsRXsPCbo9I6cmeugF56pBgW7wqgnlczkjP+Bs/WOIuTkFD=
V
r9I/SKIpo2DjMmXwTFgpRrjf4DVCighbTDSWu2kdnyYx14Nl99yKu6Ckx2eCSAAAAAAAAA=3D=
=3D
--Apple-Mail=3D_F11E6F9C-BEE4-43D1-8AA5-12D94EB037C6--

I'm not familiar with S/MIME in depth, but those single letters on every other line seem suspicious...

@ikedas
Copy link
Member

ikedas commented Jul 27, 2022

Hi @djzhh ,
I could reproduce the problem on my server.

Could you please apply this patch and check if the problem will be solved?

@djzhh
Copy link
Author

djzhh commented Jul 27, 2022

The patch works :)
どうもありがとうございます, Ikeda さん

@ikedas ikedas added the ready A PR is waiting to be merged. Close to be solved label Jul 27, 2022
ikedas added a commit that referenced this issue Jul 27, 2022
Crash with the broken message with "multipart/signed" MIME type (#1454)
@ikedas
Copy link
Member

ikedas commented Jul 28, 2022

@djzhh , こちらこそ、ありがとうございます。Thank you for reporting bug and confirming fix!

@ikedas ikedas removed the ready A PR is waiting to be merged. Close to be solved label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants