mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #866] Sending an email with no body causes fatal PHP error #502
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#502
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 @PaulTGG on GitHub (Jan 13, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/866
Originally assigned to: @mercihabam on GitHub.
🐛 Bugreport
The fatal error leaves users with a blank screen. Example error:
[Fri Jan 12 16:41:04.080582 2024] [proxy_fcgi:error] [pid 26227] [client deleted] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /usr/local/share/cypht/modules/core/message_functions.php:438\nStack trace:\n#0 /usr/local/share/cypht/modules/core/message_functions.php(438): DOMDocument->loadHTML()\n#1 /usr/local/share/cypht/modules/core/message_functions.php(41): HTMLToText->__construct()\n#2 /usr/local/share/cypht/modules/smtp/hm-mime-message.php(244): convert_html_to_text()\n#3 /usr/local/share/cypht/modules/smtp/hm-mime-message.php(92): Hm_MIME_Msg->prep_message_body()\n#4 /usr/local/share/cypht/modules/smtp/modules.php(730): Hm_MIME_Msg->get_mime_msg()\n#5 /usr/local/share/cypht/lib/modules_exec.php(177): Hm_Handler_process_compose_form_submit->process()\n#6 /usr/local/share/cypht/lib/modules_exec.php(155): Hm_Module_Exec->run_handler_module()\n#7 /usr/local/share/cypht/lib/dispatch.php(221): Hm_Module_Exec->run_handler_modules()\n#8 /usr/local/share/cypht/lib/dispatch.php(191): Hm_Dispatch->process_request()\n#9 /...'
@marclaporte suggested the user be prompted if they try to send an email with a blank body or subject. A good idea, and it would also be nice if it was an option that could be toggled.
Version & Environment
Rev: Not sure, but it was the master on January 5.
OS: Debian 12.4.0
Steps to reproduce