Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
调用 DataTable.Select 时是否可以使用 sql 注入代码?我怎样才能限制这种漏洞或完全摆脱它?
即使我不知道 DataTable.Select-Statement,我也会说:
是否存在 SQL 注入的可能性始终取决于传递给 DataTable.Select 的内容是否涉及用户生成的输入。
如果您必须确保正确转义它,或者在整数值的情况下,也可以确保它们是整数类型并且不包含文本。