We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Message::getFrom() returns a string instead of an object for mails with such a header:
Message::getFrom()
string
From: "Facebook" <[email protected]> To: "…" <…> Subject: … Date: Fri, 1 Oct 2020 01:01:01 +0200 Message-ID: <…@facebookmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_…" X-Priority: 3 X-Mailer: ZuckMail [version 1.00] Thread-Index: …== X-Facebook: from 2401:db00:321c:e0b:face:0:170:0 ([MTI3LjAuMC4x]) by www.facebook.com with HTTPS (ZuckMail); X-Facebook-Notify: msg; from=123456789012345; t=cid.c.…:…; mailid=… X-FACEBOOK-PRIORITY: 0 X-Auto-Response-Suppress: All
To Reproduce Steps to reproduce the behavior:
// […] $folders = $c->getFolders(); foreach ($folders as $folder) { $msgs = $folder->messages(); $msgs = $msgs->setFetchBody(false); $mails = $msgs->all()->get(); foreach ($mails as $mail) { var_dump($mail->getFrom());
string(15) "123456789012345"
Expected behavior
[0]=> object(stdClass)#1234 (5) { ["personal"]=> string(35) "Facebook" ["mailbox"]=> string(5) "notification" ["host"]=> string(8) "facebookmail.com" ["mail"]=> string(14) "[email protected]" ["full"]=> string(52) "Facebook <[email protected]>" } }
Desktop:
The text was updated successfully, but these errors were encountered:
Hi @itkfm , thanks for your excellent and well written report.
I was able to reproduce the problem and identified Header::extractHeaderExtensions() as the problematic method which "overwrites" the from header.
from
The "from" found in X-Facebook-Notify: msg; from=123456789012345; t=cid.c.…:…; mailid=… overwrites the original from.
X-Facebook-Notify: msg; from=123456789012345; t=cid.c.…:…; mailid=…
Best regards,
Sorry, something went wrong.
Potential header overwriting through header extensions #35
a069c88
No branches or pull requests
Describe the bug
Message::getFrom()
returns astring
instead of an object for mails with such a header:To Reproduce
Steps to reproduce the behavior:
Expected behavior
Desktop:
The text was updated successfully, but these errors were encountered: