How to prevent Sql-Injection on User-Generated Sql Queries

前端 未结 15 1945
伪装坚强ぢ
伪装坚强ぢ 2021-02-10 11:55

I have a project (private, ASP.net website, password protected with https) where one of the requirements is that the user be able to enter Sql queries that will directly query t

15条回答
  •  清酒与你
    2021-02-10 12:33

    This is a terribly bad practice. I would create a handful of stored procedures to handle everything you'd want to do, even the more advanced queries. Present them to the user, let them pick the one they want, and pass your parameters.

    The answer above mine is also extremely good.

提交回复
热议问题