Skip to content

Issue with cyrillic encoded attachments from mailbox #22997

@akstis-typer

Description

@akstis-typer

Code of Conduct

  • I agree to follow this project's Code of Conduct

Disable plugins

  • I reproduce the issue with all plugins disabled

Is there an existing issue for this?

  • I have searched the existing issues

Version

11.0.4

Bug description

When mailcollector collecting mail from mailbox - csv files that were encoded in Windows1251 encoding will be processed by Mailcollector so they'll no longer have valid encoding. I find issue in src/Mailcollector.php in getDecodedContent method. The files that doesn't include charset info get decoded with ISO-8859-1
The issue is that - the files that mailcollector process will have corrupted encoding - so when you download them from GLPI - they no longer valid
I provide a PR that will solve this issue

Relevant log output

Page URL

No response

Steps To reproduce

  1. Configure mailcollector in GLPI
  2. Send an email with attachment encoded with Windows1251 for example
  3. Recieve a ticket, with attachment that'll have broken encoding
    Note: not every encoded file will be corrupted, only files that doesn't have charset data in it

Your GLPI setup information

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions