File upload security |
11/14/2024 8:42:12 AM |
PHPRunner Tips and Tricks | |
![]() This applies to both PHPRunner and ASPRunner.NET. The question our customers ask sometimes is as follows: The short answer is No, this is not a security risk. PNG or PDF files will not be executed by the web server and can be only downloaded back. As an additional security measure it is recommended to store uploaded files outside of web server root folder, so they cannot be executed via web browser. You can find more info here: If you need to make sure that only real PNG, GIF, JPEG, PDF etc files can be uploaded, that can be done too, though it doesn't improve the security one bit. If your client insists on such measures, you can use events like AfterAdd/AfterEdit to examine file content and delete it if it doesn't validate as a real PNG or PDF file. The following articles can help: |
|