Skip to content
Snippets Groups Projects
Commit 917599fe authored by Fabien Zucchet's avatar Fabien Zucchet
Browse files

Try to fix SQL injections

parent 7ea3aa91
Branches
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ function addNewAdministrateur(req, res) {
var con = mysql.createConnection(dbConfig);
var query = "INSERT INTO `Admin` (`login`) VALUES (??);";
var inserts = [req.body.login];
var completeQuery = sql.preparer(mysql, query, inserts);
var completeQuery = mysql.format(query, inserts);
con.connect();
con.query(completeQuery, (err, result) => {
if (err) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment