php - Do I need to sanitize POST data when writing to a text file? -
I have POST input that I am performing some mysql queries.
I'm cleaning that post thoroughly before using it with my database queries ... there is no problem.
Now I think I want to start logging in a text file, which my users are putting in that input field ... looks better for what looks better for users is. I'm just writing in a txt file ... got .. covered .. no problem
My question is ... Can I use raw (pre-synced) as my string Write the text file that I can safely use post data? I would also like to see if any fun business is being posted to test my site's safety ... injection efforts etc. I think it's okay because I'm just writing a text file ... or am I completely wrong and this is a bad practice?
This will not collect an uncertain data on my input field, just to see what a customer wants.
Yes: -)
Just a little bit of advice, that file out of webfot Save, no one can read it through the web.
Comments
Post a Comment