You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue raised by @ZeroZ-lab highlights a potential security concern with Dify's file upload functionality, specifically regarding the handling of filenames with special characters. The concern is that obtaining the file extension through text splitting may not be sufficiently safe, especially for filenames like "a*a.jpg" or "a/a.jpg".
Currently, Dify validates file extensions against a predefined list of image extensions, but it seems there might be a need for more robust handling of filenames with special characters to ensure security [1].
To address this, consider implementing additional checks or sanitization processes for filenames beyond just extension validation. This could involve using more secure methods for extracting file extensions that account for special characters and potential edge cases.
Self Checks
Dify version
1.1.3
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
filenames with special characters are allowed for upload, but obtaining the file extension through text splitting is insufficiently safe.
examples;
a*a.jpg
a/a.jpg
etc
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: