Is it safe to not parameterize an SQL query when the parameter is not a string?

前端 未结 11 847
一生所求
一生所求 2020-12-23 15:57

In terms of SQL injection, I completely understand the necessity to parameterize a string parameter; that\'s one of the oldest tricks in the book. But when can

11条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-23 16:25

    It is ok but never safe.. and the security always depend on the inputs, for example if the input object is TextBox, the attackers can do something tricky since the textbox can accept string, so you have to put some kind of validation/conversion to be able prevent users the wrong input. But the thing is, it is not safe. As simply as that.

提交回复
热议问题