php - input sanitation for select option fields necessary? -
following situation: have form dropdown lists populate database. there's text input field. form sent via post. i'm wondering is, necessary sanitize $_post variables (besides text input field, of course) before putting them in sql query? after all, it's not user input if came drop down list created. $_get understand recommendation possible manipulate variables being sent. afaik, that's not possible post.
faking post
easy faking get
. so, yes, input sanitation needed.
you can fake using curl
(http://php.net/manual/en/intro.curl.php), insanely easier edit simple html page, copy & paste code in it, replace values of dropdown whatever value want keeping address in action
property of form
tag, , form send garbage unprotected script.
Comments
Post a Comment