-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Possible unwanted command execution vulnerability
Possibly a user will be able to delete an download files/folders that you don't want then to have access to.
e.g. because any $path is allowed the user could pass a path like ../../../somedirectory a parent directory outside of the project could be modified. I could be wrong but it's something that would be good to check.
Possible Cross Site Scripting (XSS) vulnerability
When accept user input and echoing it out on the page you want to page sure you stripe the input of any tags because an attacker could pass a JS script like <script> // malicious js code </script> into you form which could then be rendered into your page. This script could act as a man in the middle on your forms and send sensitive information to the attackers server over ajax etc...
Recommendations
Writing an application from scratch is a great way to start but I would recommend moving to a Framework like Laravel https://laravel.com/, as it covers a lot of the bases with security out of the box. Laravel follows the Model View Controller (MVC) design pattern but Laravel can be a bit of a leap if you have not used a framework before. This project/course would be a good stepping stone towards working with Laravel https://github.com/daveh/php-mvc