Skip to content
New issue

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

Bad Content-ID formatting handling in DetectAttachment filter fixed #413

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

pboguslawski
Copy link
Contributor

Proposed change

Znuny throws

Use of uninitialized value $ImageID in quotemeta at [...]DetectAttachment.pm line 65

error when importing e-mail message with inline image with Content-ID header value without <>. Such formatting is not allowed by RFC https://datatracker.ietf.org/doc/html/rfc2392#section-2 but is accepted Znuny in

https://github.com/znuny/Znuny/blob/rel-6_0/Kernel/System/Ticket/Article/Backend/MIMEBase/ArticleStorageFS.pm#L372

so it should tolerate it also in DetectAttachment.pm. This mod fixes it.

I also reverts 61cfc74 because HTML tags and attributes are case insensitive:

61cfc74#commitcomment-110812670

Type of change

  • '1 - 🐞 bug 🐞' - Bugfix (non-breaking change which fixes an issue)

Additional information

Replaces: #192
Related: https://datatracker.ietf.org/doc/html/rfc2392#section-2
Fixes: 61cfc74
Author-Change-Id: IB#1114877

Checklist

  • The code change is tested and works locally.(❗)
  • There is no commented out code in this PR.(❕)
  • You improved or added new unit tests.(❕)
  • Local ZnunyCodePolicy passed.(❕)
  • Local UnitTests / Selenium passed.(❕)
  • GitHub workflow CI (UnitTests / Selenium) passed.(❗)

Znuny throws

`Use of uninitialized value $ImageID in quotemeta at [...]DetectAttachment.pm line 65`

error when importing e-mail message with inline image with Content-ID header value
without <>. Such formatting is not allowed by RFC

https://datatracker.ietf.org/doc/html/rfc2392#section-2

but is accepted Znuny in

https://github.com/znuny/Znuny/blob/rel-6_0/Kernel/System/Ticket/Article/Backend/MIMEBase/ArticleStorageFS.pm#L372

so it should tolerate it also in DetectAttachment.pm.

This mod fixes it.

I also reverts 61cfc74 because HTML tags and attributes are case insensitive:

znuny@61cfc74#commitcomment-110812670

Related: https://datatracker.ietf.org/doc/html/rfc2392#section-2
Fixes: 61cfc74
Author-Change-Id: IB#1114877
Fixes: 1581fff
Author-Change-Id: IB#1114877
Author-Change-Id: IB#1114877
Author-Change-Id: IB#1114877
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - 🐞 bug 🐞 An issue with the system.
Development

Successfully merging this pull request may close these issues.

2 participants