I am building an application for a smaller group of administrators which will be locked down by password. Take it as a small "intranet" app. As my post data is getting larger (many of input fields, long forms), I am wondering about security.
My app is written with AngularJS, so I have made a full frontend validation.
NOTE: I am not using routes with AngularJS, Laravel is taking care of that. All of the data is posted by Ajax calls, Laravel is inserting data in database. Both frameworks are running on same domain.
So, here I my concerns:
Should I still validate data at the backend?
Here is my thinking.
- Laravel uses CSRF protection, so no data can be submitted from other "outside" form.
- If user (administrator) submits string but not integer as needed (by defined on database structure), insert will not happen.
- Laravel escapes input data, so I presume no SQL injection can be performed? I am using Eloquent ORM through all of my code.
- Is there something more? In general, what could be validated? Just types of inputs?
Extra question: What should I be doing differently if my app wasn't behind password?