cypht-org / cypht

Cypht: Lightweight Open Source webmail aggregator [PHP, JS]. Supports IMAP/SMTP, JMAP and soon EWS
http://cypht.org
GNU Lesser General Public License v2.1
1k stars 161 forks source link

cannot reply to an email - as $excluded is only a string array #656

Closed cdreier closed 1 month ago

cdreier commented 1 year ago

πŸ› Bugreport

when clicking reply to an email, the following error is thrown in the logs and the browser receives a 500 response

PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/share/cypht/modules/core/message_functions.php:161
Stack trace:
#0 /usr/local/share/cypht/modules/smtp/modules.php(1035): format_reply_address()
#1 /usr/local/share/cypht/lib/module.php(529): Hm_Output_compose_form_content->output()
#2 /usr/local/share/cypht/lib/modules_exec.php(101): Hm_Output_Module->output_content()
#3 /usr/local/share/cypht/lib/modules_exec.php(83): Hm_Module_Exec->process_result()
#4 /usr/local/share/cypht/lib/modules_exec.php(44): Hm_Module_Exec->run_output_module()
#5 /usr/local/share/cypht/lib/dispatch.php(237): Hm_Module_Exec->run_output_modules()
#6 /usr/local/share/cypht/lib/dispatch.php(191): Hm_Dispatch->process_request()
#7 /usr/local/share/cypht/site/index.php(50): Hm_Dispatch->__construct()

it does not appear on all mails, only for those that are sent with cypht - for the mails who crash, the $excluded array only contains strings - so this line crashes

https://github.com/jasonmunro/cypht/blob/96fcd8e6156cec494b43626bf56577d9499db629/modules/core/message_functions.php#L161

Version & Environment

Rev: followed install instructions, last commit should be 1695f992a9163ff840efaf022ac192362cec2f2a OS: own docker image based on khromov/alpine-nginx-php8

Steps to reproduce

  1. configured and setup cypht with imap auth
  2. send a mail from one account to another, both in cypth
  3. click "reply"
  4. ...
  5. Profit
marclaporte commented 1 year ago

Thank you @cdreier

Do you think it could be related to https://github.com/jasonmunro/cypht/pull/651 by @capocasa ?

marclaporte commented 1 year ago

Can you confirm if replying from emails in these two places has the same behavior? 2023-02-19_015804

marclaporte commented 1 year ago

This is over a year old. Please retest one or both of the following:

marclaporte commented 6 months ago

@cdreier we now have 3 branches: https://github.com/cypht-org/cypht/wiki/Lifecycle

marclaporte commented 1 month ago

@cdreier Closing as outdated.

We now have revamped and official Docker: https://hub.docker.com/r/cypht/cypht

Please use latest stable version: https://github.com/cypht-org/cypht/releases