-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Additional validation for st.file_uploader files #11883
Copy link
Copy link
Closed
Labels
feature:st.file_uploaderRelated to the `st.file_uploader` widgetRelated to the `st.file_uploader` widgettype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features
Description
Checklist
- I have searched the existing issues for similar feature requests.
- I added a descriptive title and summary to this issue.
Summary
Only literal comparison is used to enforce file extension restriction.
Users can upload file named "filename.anyExt:$fakeStream.allowedExt" to bypass st.file_uploader type restriction on NTFS.
The request is to add additional validation by putting some kind of validation in the file name for invalid/malicious characters i.e. ', “, :, ; etc.
Note: Streamlit considers this feature a usability feature and expects developers to do additional security validation as required by their application.
Why?
No response
How?
No response
Additional Context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature:st.file_uploaderRelated to the `st.file_uploader` widgetRelated to the `st.file_uploader` widgettype:enhancementRequests for feature enhancements or new featuresRequests for feature enhancements or new features