Are parameterized queries in PDO necessary for request variables?

前端 未结 2 1895
北荒
北荒 2021-01-25 07:45

I understand that parameterized queries are essential when user-submitted data is on the prowl, however my question is whether this applies to user-TAMPERABLE data?

So i

2条回答
  •  一向
    一向 (楼主)
    2021-01-25 08:30

    Url encoding would not remove the threat.

    Anything that is touchable by the user should be treated as unsafe and a potential threat. You query by id as such not validating it and just shoving it straight into a query can still cause the same injection problems as not using PDO at all.

提交回复
热议问题