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.