Hipnoted Posted June 16, 2008 at 08:39 AM Report Share #191456 Posted June 16, 2008 at 08:39 AM Como apenas estou habituado a evitar isso em PHP, surgiu-me uma situação que é a de evitar o SQL Injection usando C#. Para o pessoal mais experiente, qual será a melhor forma? Existem métodos específicos? (Ate´agora não encontrei nada) "Nunca discutas com um idiota. Eles arrastam-te até ao seu nível e depois ganham-te em experiência" Link to comment Share on other sites More sharing options...
vitortomaz Posted June 16, 2008 at 09:28 AM Report Share #191461 Posted June 16, 2008 at 09:28 AM Métodos específicos quase de certeza que não. Costumo tentar evitar isso com parâmetros tipificados nas queries, não resolve tudo mas dá uma ajuda. De resto acho que tens que fazer o "sanitize" à mão... http://vitortomaz.blogspot.com/ Link to comment Share on other sites More sharing options...
Betovsky Posted June 17, 2008 at 10:39 AM Report Share #191617 Posted June 17, 2008 at 10:39 AM Acho que basta fazeres querys parametrizáveis. Penso que para a maior parte dos casos normais seja o suficiente. Claro que se fores fazer querys dinâmicas aí terás que ter cuidados extra. "Give a man a fish and he will eat for a day; Teach a man to fish and he will eat for a lifetime. The moral? READ THE MANUAL !" Sign on a computer system consultant's desk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now