Preventing SQL injection in Node.js

前端 未结 5 1897
青春惊慌失措
青春惊慌失措 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:17

    I know that this question is old but for anyone interested, Mysql-native has been outdated so it became MySQL2 that is a new module created with the help of the original MySQL module's team. This module has more features and I think it has what you want as it has prepared statements(by using.execute()) like in PHP for more security.

    It's also very active(the last change was from 2-1 days) I didn't try it before but I think it's what you want and more.

提交回复
热议问题