Skip to content

[15.0][ADD] attachment_mimetype_restriction#1857

Open
AungKoKoLin1997 wants to merge 1 commit into
OCA:15.0from
qrtl:15.0-add-attachment_mimetype_restriction
Open

[15.0][ADD] attachment_mimetype_restriction#1857
AungKoKoLin1997 wants to merge 1 commit into
OCA:15.0from
qrtl:15.0-add-attachment_mimetype_restriction

Conversation

@AungKoKoLin1997
Copy link
Copy Markdown

@AungKoKoLin1997 AungKoKoLin1997 commented Apr 27, 2026

This module blocks specific MIME types from being uploaded as attachments using content-based detection rather than filename extensions. This prevents uploading potentially dangerous files (executables, scripts, etc.).

@qrtl QT5832

@OCA-git-bot OCA-git-bot added series:15.0 mod:attachment_mimetype_restriction Module attachment_mimetype_restriction labels Apr 27, 2026
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-attachment_mimetype_restriction branch 2 times, most recently from 8138261 to 556a7c0 Compare April 28, 2026 02:06
@AungKoKoLin1997 AungKoKoLin1997 marked this pull request as ready for review April 28, 2026 02:07
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-attachment_mimetype_restriction branch 2 times, most recently from 89a3294 to 232a014 Compare April 30, 2026 05:08
Comment on lines +57 to +60
def create(self, vals_list):
for vals in vals_list:
self._validate_mimetype_from_vals(vals)
return super().create(vals_list)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the handling of JS and CSS files that come from module installation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I handled that.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-attachment_mimetype_restriction branch from 232a014 to 061ca2a Compare May 8, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:attachment_mimetype_restriction Module attachment_mimetype_restriction series:15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants