[Bug]: Undetermined meaning of "mimetype" in Flows
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
Meaning of mimetype in not determined and not documented.
- In some cases
mimetypeis defined by filename (extension) - In other cases, it is defined by file content
Steps to reproduce
- Using
files_accesscontrolflow, block images by mime-type - Having a local image file, for example,
image.png, rename it toimage.notpng - Upload the image on the server (success)
- Remove the image from the server (blocked)
As a result, it is possible to upload a file that is not possible to delete due to block from files_accesscontrol.
Expected behavior
If mimetype is determined by file content, uploading an image should not have been allowed even it has extension .notpng.
If mimetype is determined by filename (extension), it should be allowed to delete the uploaded file because it has a non-image extension.
If this is expected behavior, it should be documented.
Nextcloud Server version
master
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the files_accesscontrol flow and reproduce the renamed-image scenario described in the issue. Trace how mimetype is determined during upload and deletion, then establish whether the behavior is based on the filename or file content. Done means the behavior is consistent or its precise meaning is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100