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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -