mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #526] Replying to some mails leads to Array instead of string #391
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#391
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @EvilDragon on GitHub (Oct 28, 2021).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/526
Issue
Replying to some emails leads to a 500 error.
The PHP log file in this case was:
mod_fcgid: stderr: PHP Fatal error: Uncaught TypeError: strlen(): Argument #1 ($str) must be of type string, array given in /usr/local/share/cypht/modules/core/message_functions.php:mod_fcgid: stderr: Stack trace:mod_fcgid: stderr: #0 /usr/local/share/cypht/modules/core/message_functions.php(539): addr_split()mod_fcgid: stderr: #1 /usr/local/share/cypht/modules/smtp/modules.php(1265): process_address_fld()mod_fcgid: stderr: #2 /usr/local/share/cypht/modules/smtp/modules.php(800): get_primary_recipient()mod_fcgid: stderr: #3 /usr/local/share/cypht/lib/module.php(526): Hm_Output_compose_form_content->output()mod_fcgid: stderr: #4 /usr/local/share/cypht/lib/modules_exec.php(101): Hm_Output_Module->output_content()mod_fcgid: stderr: #5 /usr/local/share/cypht/lib/modules_exec.php(83): Hm_Module_Exec->process_result()mod_fcgid: stderr: #6 /usr/local/share/cypht/lib/modules_exec.php(44): Hm_Module_Exec->run_output_module()mod_fcgid: stderr: #7 /usr/local/share/cypht/lib/dispatch.php(236): Hm_Module_Exec->run_output_modules()mod_fcgid: stderr: #8 /usr/local/share/cypht/lib/dispatch.php(190): Hm_Dispatch->process_request()mod_fcgid: stderr: #9 /usr/local/share/cypht/index.php(50): Hm_Dispatch->__construct()mod_fcgid: stderr: #10 {main}mod_fcgid: stderr: thrown in /usr/local/share/cypht/modules/core/message_functions.php on line 472I didn't see anything special about that email.
It was a multipart message, one sender and one receiver, some attachments. Nothing appears to be out of the ordinary.
I did notice that this is the case with ALL emails I receive from that company though.
Here's the header (I've changed the IDs and names, so no secrets are shared here):
This is the subjectDate Wed Oct 27 16:04:43 2021 CEST (20 hours, 13 minutes)From Someone Else Someone.Else@ebx-frankfurt.de>To "someone@gespaxelt.de" <someone@gespaxelt.de>Tags SeenReturn-Path <Someone.Else@ebx-frankfurt.de>X-Original-To someone@gespaxelt.deDelivered-To someonealias-gespaxelt.de@boss.slowly.deDelivered-To someone-gespaxelt.de@boss.slowly.deReceived by boss.slowly.de (Postfix) id 3CF7242CD1410; Wed, 27 Oct 2021 16:04:50 +0200 (CEST)Received from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by boss.slowly.de (Postfix) with ESMTPS id C2A233F130F for <someone@gespaxelt.de>; Wed, 27 Oct 2021 16:04:49 +0200 (CEST)Received from EBW-SSZ-EXC01.EBVA.NETZ ([185.112.216.37]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mqagw-1n1t4H10iG-00mXEB for <someone@gespaxelt.de>; Wed, 27 Oct 2021 16:04:45 +0200Received from ERC-SRZ-EXC01.ERCI.NETZ (192.168.121.6) by ERC-SRZ-EXC01.ERCI.NETZ (192.168.121.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.5; Wed, 27 Oct 2021 16:04:44 +0200Received from ERC-SRZ-EXC01.ERCI.NETZ ([fe80::d4b4:d481:3d28:f489]) by ERC-SRZ-EXC01.ERCI.NETZ ([fe80::d4b4:d481:3d28:f489%4]) with mapi id 15.02.0858.010; Wed, 27 Oct 2021 16:04:44 +0200Thread-Topic This is the subjectThread-Index AdfLO3QSWs167kWEFijfl1QS+a83RlA==Message-ID <7cfa89b63b5748fbbcbOJfe8406a46c5@ebx-frankfurt.de>Accept-Language de-DE, en-USContent-Language de-DEX-MS-Has-Attach yesX-MS-TNEF-Correlatorx-originating-ip [192.168.0.199]Content-Type multipart/mixed; boundary="_004_7cfa89berfrg5ffbbcbe91f8406a46c5ercingolstadtde_"MIME-Version 1.0X-Provags-ID V03:K1:cuFywperfWn8yPc5zFe9Doblq5yLk48rijr451X4zp3aWhR8ZP 5P4bHebnFJMQZDuNsaE+DhONV4i33dIv+S94IBmt/hdnk7Vk+QUlx6jmyDHAx2B9N8GZxbH f3GcZ5pott7oEGdBuxdI5+p8hevXyR0t6/nVavNflH0pLvlaRo7epAK5cANt/8WnJXhcTMw OGmQ29EHpIz5j9XBib2pw==X-Spam-Flag NOX-UI-Out-Filterresults notjunk:1;V03:K0:iuK/wT+YKtA=:z/1WcdXQWlnuXJM3ehKvqP XJK5PaFtoV/ZcSEyMFSogF99Q2frRoA31ydvViM+ItyOFPEBuyOo6DLGrVndJPTY10WCXjQRc W9ApaThmfMtpYmQfLdDEzuvL33aGXBpW1z8lmdFFbv+8/T9UqX5liODctL0xbvrJekDaddlXc RBFqYb3Eqvrw94mQkEXZyr6E7IkMWKnfv9rNZB0Hlg+vtTVnOpJKR+nAsNNqToVXtJhLj/0vY Sr4r6uauh9gMJhDGskEKkQjVoK2OcCmZdDXTQPzJcVw2E/arQG57WjdRDZjunDtf1IAbx4a1L goz4sNSG3+mSYa1bY6DuBlVy7P6fAlT1rX09+RTp0+u21W5SfZ16Ik+21O3Hxw3DerggthtrmG GPjVZWaRosyonnIqzhIkOZ0Aia6YXeUpdF0i0R+rxGAVYjQ65mg+PUCh65QSYLXpzK0AL6Vzg J0JDDh6ja0P5tdLjSfx2wlT7/kwICi+cSLnRo/RS+vS1VBeBncF51VJT2MgIvDJ1qidcyBTdY JSLEFKAVylJvoQiB49M0nJ1K0vYcHEoWQfSNiGQzPjb01A2URZudPhh1X8/Lckgbf1U8Gfx+k ZhOl74uU0HMC69HK/cFlUdC+0K/b8wCZBlWYRvtklFhzR1Wm57LY1bmsQA7olWwiUuOQTanl0 91A0g8WNkUyivnIRWDZkQRuths90QaYVizuOqZJyPRV6U3gergfoaMlPhz4ABoDzaLXkS0 oUj4DPmhWtIIzLUW/GSGT3DJK7IltcYdpT+2gA==Arrival Date 27-Oct-2021 16:04:52 +0200PHP version 8.0.12, Zend Version 4.0.12, latest master version from 2021-10-26
@kk6mrp commented on GitHub (Jan 14, 2022):
@jasonmunro, Correct me if I'm wrong but I'm looking at this issue and it looks like the same issue as https://github.com/jasonmunro/cypht/issues/544, only with the Delivered-To header.
Do you think we need to add an extra foreach loop or imploding the array would work here as well?
@jasonmunro commented on GitHub (Jan 14, 2022):
In the latter case implode() works as we are just plucking links from the header, however in this case we need a loop. I have not looked at the specific code yet but my guess is the best way to handle it is to type check it, and if it's a string make it an array with a single value, then modify the code to always work with arrays.
@kk6mrp commented on GitHub (Jan 14, 2022):
Ok, that's a good idea. I'll work on that when I get some time.
@marclaporte commented on GitHub (Jul 31, 2022):
@kk6mrp Please trying again with latest code from master.
@marclaporte commented on GitHub (Oct 22, 2022):
@kk6mrp We need you
@marclaporte commented on GitHub (May 6, 2024):
@EvilDragon
Please retest, as a lot has changed since you reported this issue. Notably, we now have 3 active branches and recently released Cypht 2.0.0
@marclaporte commented on GitHub (Sep 28, 2024):
@EvilDragon @kk6mrp last call :-)
Please retest with latest stable:
https://github.com/cypht-org/cypht/releases/