Download the latest release{style="display:inline-block;padding:12px 18px;background:#6b7280;color:#fff;border-radius:8px;text-decoration:none;font-weight:600;"}
- Open the release page
- Download the latest release file for Windows
- Save the file to a folder you can find again, such as Downloads or Desktop
magento-polyshell-patch helps protect a Magento store from a file upload issue tied to cart item custom options.
It checks file uploads and keeps image uploads limited to these file types:
jpgjpeggifpng
It uses two checks:
- One check blocks unsafe file names before the file is saved
- Another check tells Magento to allow only image file types
This gives you two layers of protection for the same upload path.
Follow these steps in order.
- Open the release page
- Download the newest release file
- If the download comes as a ZIP file, right-click it and choose Extract All
- Open the extracted folder
- Find the Windows file inside
- Double-click the file to run it
If Windows asks for confirmation, choose Run anyway only if you trust the source and the release file matches the project page.
Make sure you have:
- A Windows PC
- Access to the folder where the file was saved
- A Magento site you want to protect
- Permission to update the site files
If you manage the site for someone else, use the account or access method that lets you add or update Magento modules.
This module adds a simple guard around image uploads in Magento.
It helps stop:
- Dangerous file uploads
- Files with script-style extensions
- Uploads that should not pass the Magento image picker
- Attempts to bypass file type checks through custom options
It is designed for store owners who want a tighter upload path without changing how the rest of Magento works.
The module uses two plugins:
This check runs before the file goes to disk.
It looks at the file name and rejects uploads that do not end in an image extension.
This check calls setAllowedExtensions() on Magento’s uploader.
That means Magento also checks the file type on its own and blocks files that do not match the allowlist.
Together, these checks reduce the chance that a bad file gets through.
This project protects a Magento site. It is not a full desktop app with a normal Windows window.
To use the download on Windows:
- Open the release page
- Download the latest release package
- Extract the files if needed
- Copy the module folder into your Magento project
- Run the Magento commands in a terminal if you manage the site yourself
If you are only trying to get the module file, the release page is the place to visit.
If you already have access to the Magento server, use these steps:
- Download the release package
- Place the module in your Magento codebase
- Enable the module
- Run the Magento upgrade step
- Clear the cache
The project uses the module name:
MarkShust_PolyshellPatch
If you are adding the module by hand, the typical folder path is:
app/code/MarkShust/PolyshellPatch
After that, the module must be enabled in Magento.
The usual command flow is:
bin/magento module:enable MarkShust_PolyshellPatchbin/magento setup:upgradebin/magento cache:flush
After the module is active:
- Magento should allow only image uploads through the protected path
- Non-image file names should be blocked
- The upload flow should reject unsafe extensions
- Cache changes may need to be cleared before the update takes effect
If you test the store, try a normal image file first, such as a PNG or JPG.
The allowlist includes:
- JPG
- JPEG
- GIF
- PNG
Any other extension should be blocked by the module.
The module blocks uploads inside Magento, but you should also block access at the web server level.
For a production store, set up rules that stop web access to uploaded script files and other unsafe content paths.
Use the right config for your server type, such as:
- Nginx
- Apache
- IIS
If your site has a media folder, review which file types can be served from it.
If the module does not seem to work, check these items:
- The module folder is in the right place
- The module name matches
MarkShust_PolyshellPatch - The Magento cache was cleared
- The upgrade step was run
- The release file was fully extracted
- The upload you tested uses a blocked file type
A typical setup may look like this:
magento/app/code/MarkShust/PolyshellPatch/bin/magentovar/pub/
This helps keep the module in the normal Magento project structure.
This project fits:
- Magento store owners
- Site admins
- Agency teams
- Security-focused ecommerce teams
- Anyone who needs tighter image upload rules
Get the latest build here:
Download the release package, extract it if needed, then run or install the module based on your Magento setup
- Repository:
magento-polyshell-patch - Magento module:
MarkShust_PolyshellPatch - Composer package:
markshust/magento2-module-polyshell-patch
Before you trust an uploaded file, make sure it is:
- An image
- Named with a normal image extension
- Stored in the expected upload path
- Blocked if it looks like a script file
The goal is simple:
- keep image uploads limited
- reduce the chance of unsafe file upload abuse
- add a second check inside Magento
- support safer store operations