Does using parameterized SqlCommand make my program immune to SQL injection?

后端 未结 5 1731
故里飘歌
故里飘歌 2020-11-27 19:12

I\'m aware that SQL injection is rather dangerous. Now in my C# code I compose parameterized queries with SqlCommand class:

SqlCommand command = ...;
command         


        
5条回答
  •  旧巷少年郎
    2020-11-27 19:28

    You are not immune to SQL injection if you use dynamic sql, even if you are passing it through parameters. Too bad SQL Server doesn't have a built in function to sanitize parameters

提交回复
热议问题