Skip to content
Advertisement

Tag: sql-injection

FromSqlRaw injection EF Core 3.0

I am wondering how safe the fromSqlRaw method is. I am doing the following in my code, where the person id is a parameter from the method itself: Is this code safe to SQL injection? And is there other security vulnerabilities that I should know of when using this? Answer Use proper parametrization for your input. After clarifications in comments,

How to avoid SQL injection on query

My SQL query construction in python code is: When I run Bandit security tool, it says “Possible SQL injection vector through string-based query construction.” How do I avoid it? Answer Best practices recommend to avoid to dynamically build the query and instead use a parameterized query. But the goal is precisely to avoid what you are doing here: prevent a

How can I secure this sql query from SQL Injection in Laravel?

I am trying to create restAPI in Laravel. How can I secure an SQL query like this from sql injection? Answer Laravel’s database query builder provides a convenient, fluent interface to creating and running database queries. It can be used to perform most database operations in your application and works on all supported database systems. The Laravel query builder uses

Avoiding SQL Injections with Parameters by C#?

I have recently adjusted my code to avoid getting SQL injections for maria db and got helped with adding parameters ,when I using parameters method page got running time error I am relatively new to using maria db so any help is appreciated Answer If you want to avoid SQL injections, another approach besides parametrized queries is stored procedures. You

Is escaping SQL queries like this safe?

I am currently working on a NodeJS backend script that parses incoming HTTP requests to write to and read from a MySQL database for work. I tried to protect it against SQL injections by using a kind of two-layer protection. To write to the database the user needs to provide valid JSON. This is how the JSON’s keys need to

Advertisement