Hello,
I see some big security holes in most of simple programs witten by newbies (including my old applications).
Two of the most common problems:
1- Forms can be posted from hackers local computer (ie we do not test to see if form page is on our own website) in this way he may post something wrong.
For example assume we get and id number and put it directly in front of below query:
delete * from table where id=$id
Then hacker posts the value "id" instead of a number and deletes all rows!
Question: How do you prevent forms posted from a page other than your website?
2- Most of the forms on your website may be used to send queries to your SQL server.
Lets assume you get an id from your form and do above query again.
He is supposed to type 19 in the txt box and below query is constructed.
delete * from table where id=19
Now what if he types :
"19;delete * from table;"
Question: How do you avoid inserting critical things into your forms to affect your website?
Your opinions, advices and help is appereciated.
Regards,
Mac