When is it best to sanitize user input?

前端 未结 14 879
萌比男神i
萌比男神i 2020-12-01 04:08

User equals untrustworthy. Never trust untrustworthy user\'s input. I get that. However, I am wondering when the best time to sanitize input is. For example, do you blindly

14条回答
  •  爱一瞬间的悲伤
    2020-12-01 04:37

    User input should always be treated as malicious before making it down into lower layers of your application. Always handle sanitizing input as soon as possible and should not for any reason be stored in your database before checking for malicious intent.

提交回复
热议问题