OpenMage / magento-lts

Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
https://www.openmage.org
Open Software License 3.0
866 stars 436 forks source link

Added hadling of allowed_extensions for file uploads in backend's configuration section #4078

Closed eneiasramos closed 2 months ago

eneiasramos commented 3 months ago

Added support for tag allowed_extensions in file upload in backend system configuration.

kiatng commented 2 months ago

@eneiasramos It will help to review if you can provide the use case.

ADDISON74 commented 2 months ago

@eneiasramos - Please provide more details about this PR. I have some time to test it.

eneiasramos commented 2 months ago

@kiatng @ADDISON74 my dears

The routine here filters the extension of a file being uploaded.

So if I upload a file with an extension different from .pfx, the system will display an error.

A use of case: I use the var folder to store PFX certificates used to communicate with a third party system:

https://github.com/gamuzatech/tolucastore-openmage/blob/f559a0e819a3124599b392fc3c4defe5c3803b68/app/code/local/Gamuza/Brazil/etc/system.xml#L400

image

kiatng commented 2 months ago

Somewhat related to PR #4079, extend functionalities of file upload in system config.

eneiasramos commented 2 months ago

@fballiano It's my pleasure. :)