Skip to content

Fix field name checks for aliases in header constructors#225

Merged
Slamdunk merged 10 commits intolaminas:2.21.xfrom
georgique:patch-allowed-header-names
Jan 6, 2023
Merged

Fix field name checks for aliases in header constructors#225
Slamdunk merged 10 commits intolaminas:2.21.xfrom
georgique:patch-allowed-header-names

Conversation

@georgique
Copy link
Copy Markdown
Contributor

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

Header constructors are improved to allow less correct header names for the sake of compatibility with HeaderLocator.
The following header names are now accepted:

  • reply_to
  • replyto
  • content_disposition
  • contentdisposition
  • content_transfer_encoding
  • contenttransferencoding
  • content_type
  • contenttype
  • mime_version
  • mimeversion

This list is now compatible with https://github.com/laminas/laminas-mail/blob/2.22.x/src/Header/HeaderLocator.php.

  • Are you fixing a bug or providing a failing unit test to demonstrate a bug?
    Fixing a bug

  • How do you reproduce it?
    Receive a message via POP3 with one of the aforementioned headers present.

  • What did you expect to happen?
    Header to be accepted and parsed, and message object created.

  • What actually happened?
    Exception thrown. Even though HeaderLocator is fine with such a header name, header's constru

  • Are you adding documentation?
    No

  • Are you providing a QA improvement (additional tests, CS fixes, etc.) that
    does not change behavior?
    No

  • Are you fixing a BC Break?
    No

  • Are you adding something the library currently does not support?
    No

  • Are you refactoring code?
    No

renovate Bot added 5 commits December 10, 2022 00:24
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Renovate Bot <bot@renovateapp.com>
Copy link
Copy Markdown
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.

This kind of change requires test additions.

…s for the sake of compatibility with HeaderLocator

Signed-off-by: George Shestayev <george@uniques.ca>
@georgique georgique force-pushed the patch-allowed-header-names branch from 7c1f98d to efe9b82 Compare January 3, 2023 17:46
Signed-off-by: George Shestayev <george@uniques.ca>
@georgique georgique force-pushed the patch-allowed-header-names branch from 9e5fdee to 527b58e Compare January 3, 2023 18:17
@georgique georgique requested a review from Ocramius January 3, 2023 18:17
georgique and others added 3 commits January 3, 2023 10:29
Signed-off-by: George Shestayev <georges@uniques.ca>
…standards

Signed-off-by: George Shestayev <georges@uniques.ca>
Signed-off-by: George Shestayev <georges@uniques.ca>
@Ocramius Ocramius requested a review from Slamdunk January 5, 2023 21:57
@Ocramius Ocramius added Awaiting Maintainer Response Bug Something isn't working labels Jan 5, 2023
@Ocramius Ocramius added this to the 2.22.0 milestone Jan 5, 2023
@Slamdunk Slamdunk changed the title Fixed checks in header constructors Fix field name checks for aliases in header constructors Jan 6, 2023
@Slamdunk Slamdunk modified the milestones: 2.22.0, 2.21.1 Jan 6, 2023
@Slamdunk Slamdunk changed the base branch from 2.22.x to 2.21.x January 6, 2023 07:10
@Slamdunk Slamdunk merged commit 6e3d32a into laminas:2.21.x Jan 6, 2023
@Slamdunk
Copy link
Copy Markdown
Contributor

Slamdunk commented Jan 6, 2023

Thank you @georgique

artemii-karkusha pushed a commit to artemii-karkusha/laminas-mail that referenced this pull request May 24, 2023
Fix field name checks for aliases in header constructors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants