Prevent SQL Injection with Nodejs and Postgres
问题 I'm developing a backend to interact with a PostgreSQL database and am looking for some help preventing SQL injection. I understand the concept of SQL injection, and have found some examples online in preventing those attacks, but not sure if prevention techniques differ between SQL providers. This is the function I use to query data: var pg = require("pg"); var client = new pg.Client(connectionString); client.connect(); module.exports = async function newQuery(query) { var result = await