Azure / Commercial-Marketplace-SaaS-Accelerator

A reference example with sample code for developers interested publishing transactable, Software as a-Service offers in the Microsoft commercial marketplace.
MIT License
205 stars 302 forks source link

Add file name and executable file validation. #756

Closed bkhabazan closed 2 months ago

bkhabazan commented 2 months ago

Added a check to ensure that the file name does not contain more than one period. If it does, an error message is set in TempData and the user is redirected to the "Index" action.

Introduced a new block of code that reads the first two bytes of the uploaded file to determine if it is an executable file (by checking for the "MZ" header). If the file is identified as an executable, an error message is set in TempData and the user is redirected to the "Index" action.

santhoshb-msft commented 2 months ago

lets work on this PR once 8 is out