Releases: aregowe/magento2-module-polyshell-protection
Releases · aregowe/magento2-module-polyshell-protection
Release list
v1.3.5
What's Changed
- Fix false positives on legit image uploads by @arnoudhgz in #19
New Contributors
- @arnoudhgz made their first contribution in #19
Full Changelog: v1.3.4...v1.3.5
v1.3.4
Fix #12 (follow-up): the v1.3.3 fix split the PHP payload string via concatenation but the explanatory comment still quoted the literal webshell signature verbatim, which Sansec eComscan's eval_post_91ce4 rule pattern-matches without context. The comment has been rewritten to describe the rationale without reproducing the signature.
v1.3.3
v1.3.2
1.3.1
What's Changed
- Add
.inc,.module,.phpsto blocked extension patterns andBASE_BLOCKED_EXTENSIONShash map - Closes double-extension bypass where files like
file.inc.pngorfile.module.gifpassedBLOCKED_EXTENSION_PATTERN - These extensions are server-executable in common web server configurations (Apache, PHP-FPM)
- Updated admin panel blocked extensions display, README, and copilot instructions
Fixes #4
v1.3.0
What's New
Configurable Allowed & Blocked Extensions (#3)
File upload extension policies are now configurable via the Magento admin panel at Stores > Configuration > PolyShell Protection without requiring code changes.
- Additional Allowed Extensions — comma-separated list of extra extensions to permit (e.g.
ai, psd, svg). - Additional Blocked Extensions — comma-separated list of extra extensions to block (e.g.
svg, swf, html). The blocklist always overrides all allowlists. - Base code-defined allowlist and blocklist are displayed as read-only notes in the admin UI.
raradded to the base allowed extensions.
Plugin Behavior Changes
ValidateUploadedFileNamePluginandValidateCustomOptionUploadPluginnow validate filenames against the merged allowlist/blocklist viaFileUploadGuard::assertSafeFileName()instead of unconditionally blocking all custom option file uploads. Safe files pass through; dangerous files are blocked with a logged warning.
New Files
etc/acl.xml— ACL resource for admin config access.etc/config.xml— Default configuration values.etc/adminhtml/system.xml— Admin UI for extension configuration.
Internal
FileUploadGuardnow depends onScopeConfigInterfacefor reading admin-configured extensions.ALLOWED_EXTENSIONSrenamed toBASE_ALLOWED_EXTENSIONS(public).- New
BASE_BLOCKED_EXTENSIONSconstant andgetAllowedExtensions()/getBlockedExtensions()methods. - Updated README and copilot-instructions with admin configuration documentation.