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
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.
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.