I have a very simple app that does allow unauthenticated users to leave comments (maybe later I will incorporate a capatcha). The app then stores the comments in a mysql db. I do my best to filter out special characters but I do not think that is the best approach. What is the best approach to guard against SQL-Injection attacks?
Additionally, the site is heavy in javascript and so I will probably rewrite some of the logic to be server-side. The main vulnerability I see would be a callback function that sends a string to the server. This string is parsed and then submitted to the db. Is this a real vulnerability and if so, how do I fix it? Also, is having logic on the client a risk? What is the criteria there?
Lastly, how do I implement a simple password hash for the db? Do I just follow these instructions? (I ask because I tried and failed but just wanted to make sure I'm chasing the right rabbit)
Also, am I missing anything big?