Problem/Motivation
The module does not restrict what is inside the zip file so it could be used to upload HTML files containing dangerous JS or PHP files.
Steps to reproduce
- Create a zip file containing a HTML file with some script in it.
- Create a bundle with a zip file field (configured to use the public files)
- As a user that can create nodes in the bundle, create a new node with the zip file in the field
- Browse to the extracted HTML file in /sites/default/files/: the JS is executed
Proposed resolution
The module should either restrict which extensions are allowed inside the zip file or require a restricted permission to upload a zip file.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork field_zip_file-3556308
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3556310-module-could-be
changes, plain diff MR !13
- 3556308-module-allows-uploading
compare
Comments
Comment #2
prudloff commentedThe "Tracking script" field could also be used to insert dangerous JS and should probably require a restricted permission.
Comment #6
vhin0210 commented