Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Fix and test ">" being part of email "comment". fixes #127 #143

Closed
wants to merge 1 commit into from

Conversation

glensc
Copy link
Contributor

@glensc glensc commented May 14, 2017

Fix from #127

Example Email-header:

  "Foo <bar" <foo.bar@test.com>

Description:

   The example email-header should be valid
   according to https://tools.ietf.org/html/rfc2822#section-3.4
   but the function AdressList.php/addFromString matches it incorrect.
   The result has the following form:
    "bar <foo.bar@test.com"
   This is clearly not a valid adress and therefore causes
   exceptions in the following code

Example Email-header:
  "Foo <bar" <foo.bar@test.com>

Description:
   The example email-header should be valid
   according to https://tools.ietf.org/html/rfc2822#section-3.4
   but the function AdressList.php/addFromString matches it incorrect.
   The result has the following form:
    "bar <foo.bar@test.com"
   This is clearly not a valid adress and therefore causes
   exceptions in the following code

zendframework#127
@glensc
Copy link
Contributor Author

glensc commented May 14, 2017

while writing test, i discovered:

        $encodedValue = $to->getFieldValue(Header\HeaderInterface::FORMAT_RAW);
        // FIXME: shouldn't the "name" part be in quotes?
        $this->assertEquals('õlu <bar <foo.bar@test.com>', $encodedValue);

this is not good. what place it needs to be fixed?

or it's irrelevant because FORMAT_RAW is for display purposes, and irrelevant how it looks?

@glensc
Copy link
Contributor Author

glensc commented Jun 8, 2017

@weierophinney #143 (comment)

can you give some feedback?

@Ocramius Ocramius self-assigned this Mar 1, 2018
@Ocramius Ocramius added the bug label Mar 1, 2018
@Ocramius Ocramius added this to the 2.9.0 milestone Mar 1, 2018
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Ocramius Ocramius changed the title WIP: fix and test ">" being part of email "comment". fixes #127 Fix and test ">" being part of email "comment". fixes #127 Mar 1, 2018
@Ocramius
Copy link
Member

Ocramius commented Mar 1, 2018

or it's irrelevant because FORMAT_RAW is for display purposes, and irrelevant how it looks?

If this is still relevant, let's push it to a different issue 🎱

@Ocramius
Copy link
Member

Ocramius commented Mar 1, 2018

Merged in e750108, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants