http://www.perlmonks.org?node_id=177198


in reply to Re: Untainting safely. (b0iler proofing?)
in thread Untainting safely. (b0iler proofing?)

I think the last paragraph should be highlighted. Do not remove bad things. Permit safe things.

A few weeks ago in a reply to someone in beginners@perl.org on similar topic I wrote:

  1. There is NO single list of dangerous characters. What characters are dangerous depends on the action you do with the data.
  2. If you or someone else creates a list of suspicious characters and test whether the data contain any of them, you are NOT safe. It's for sure you'll forget some character, it's for sure there is something you've never heard of that can go wrong.
  3. Always test whether the data DO CONTAIN ONLY ALLOWED characters. And allow only the characters you must.

  Jenda

  • Comment on Re: Re: Untainting safely. (b0iler proofing?)