由网友(三妻四妾i)分享简介:我刚刚发现,如果我写select * from tbl where name like @foo然后加富与价值 \ A (用户数据)的参数,它不会正确地转义。搞什么鬼!?!它希望 \\一个。我不禁觉得我开到一个SQL注入,即使我使用的参数。Then add foo as a parameter with the v...
我刚刚发现,如果我写
select * from tbl where name like @foo
然后加富与价值 A
(用户数据)的参数,它不会正确地转义。搞什么鬼!?!它希望 一个
。我不禁觉得我开到一个SQL注入,即使我使用的参数。
Then add foo as a parameter with the value a
(user data) that it will not escape it correctly. What the hell!?! It wants a
. I can't help but feel i'm open to a sql inject even though i am using parameters.
我如何逃脱的变量中的用户数据是否正确?我使用MySQL在C#中使用dapper.net
How do I escape the user data in variables correctly? I'm using mysql on C# with using dapper.net
推荐答案
对于像我陈述了在这个
.Replace(@"", @"").Replace(@"_", @"_").Replace(@"%", @"%")
相关推荐
最新文章