In EmailAttachmentEvaluator::evaluateAttachments(), the dynamic-attachments branch unconditionally strips a leading slash before calling realpath(). The in-source comment explains the intent: a friendly normalization for admins who type /some/relative/inside-docroot, thinking it means relative to the project root.

But the strip also fires on legitimate absolute paths. /var/www/example.com/web/sites/default/files/foo.pdf is rewritten to var/www/example.com/web/sites/default/files/foo.pdf, then realpath() tries to resolve it relative to PHP's CWD, fails, and the file is silently reported as attachment not found even though it's readable as the original absolute path. Any code that populates attachment_path with a real filesystem path could be affected by this.

Issue fork easy_email-3591728

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

zengenuity created an issue. See original summary.

zengenuity’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.