DataTable.Select注入
调用 DataTable.Select 时是否可以使用 sql 注入代码?我怎样才能限制或完全消除这种漏洞?
Is there possible to use sql-injection code while invoking DataTable.Select? How can I restrict such vulnerability or get rid of it at all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
即使我不知道 DataTable.Select-Statement,我也会说:
是否存在 SQL 注入的可能性始终取决于传递给 DataTable.Select 的内容中是否涉及用户生成的输入。
如果有,您必须确保正确转义它,或者在整数值的情况下,也可以确保它们是整数类型并且不包含文本。
Even though I don't know the DataTable.Select-Statement, I would say:
If there is a possibility of an SQL injection always depends on, whether there is user-generated input involved in what you pass to DataTable.Select.
If there is you have to make sure to escape it properly, or in case of integer values, its also fine to make sure, they are of integer type and don't contain text.