Preventing SQL injection in Node.js

前端 未结 5 2052
青春惊慌失措
青春惊慌失措 2020-11-22 16:48

Is it possible to prevent SQL injections in Node.js (preferably with a module) in the same way that PHP had Prepared Statements that protected against them.

If so, h

5条回答
  •  时光说笑
    2020-11-22 17:16

    The node-mysql library automatically performs escaping when used as you are already doing. See https://github.com/felixge/node-mysql#escaping-query-values

提交回复
热议问题