Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Fix SuspiciousFileOperation when storing inline attachments#279

Open
hostdrive wants to merge 2 commits intomodoboa:masterfrom
hostdrive:master
Open

Fix SuspiciousFileOperation when storing inline attachments#279
hostdrive wants to merge 2 commits intomodoboa:masterfrom
hostdrive:master

Conversation

@hostdrive
Copy link
Copy Markdown

Fixes this issue: #278

SuspiciousFileOperation at /webmail/getmailcontent
Detected path traversal attempt in '/srv/modoboa/instance/media/webmail/9162_image001.png@01DBE4E4.70E93650'

Seems that Django will no longer accept absolute paths when storing media files, and insists on a relative path within the MEDIA_ROOT.

@hostdrive
Copy link
Copy Markdown
Author

Oops, 2nd try, fixed a copy/paste failure on my part

@tonioo
Copy link
Copy Markdown
Member

tonioo commented Jul 2, 2025

@hostdrive Thanks!
Since the webmail has been moved to main repo, I've backported your change in this commit:
modoboa/modoboa@0b9767a#diff-7acf8681c539b2c625eb295e0096e7601f84b3c7293f9321365da1430f2c06b4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants