diff --git a/package-lock.json b/package-lock.json index da63e4e..e35c8e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "dependencies": { "body-parser": "^2.2.2", - "cors": "^2.8.5", + "cors": "^2.8.6", "dotenv": "^17.2.3", "express": "^5.2.1", "mariadb": "^3.4.5", @@ -199,16 +199,19 @@ } }, "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "license": "MIT", + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", "dependencies": { "object-assign": "^4", "vary": "^1" }, "engines": { "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/debug": { diff --git a/package.json b/package.json index 0b509bd..d69562a 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "dependencies": { "body-parser": "^2.2.2", - "cors": "^2.8.5", + "cors": "^2.8.6", "dotenv": "^17.2.3", "express": "^5.2.1", "mariadb": "^3.4.5", diff --git a/server.cjs b/server.cjs index fa63651..03677cd 100644 --- a/server.cjs +++ b/server.cjs @@ -84,7 +84,7 @@ app.get("/trigger/api/wolEnabled", async (_req, res) => { app.patch("/trigger/api/personalData", async (req, res) => { const conn = await pool.getConnection(); - const query = `UPDATE trigger_database.personalData SET firstName = ${escapeString(req.body.firstName)}, lastName = ${escapeString(req.body.lastName)}, email = ${escapeString(req.body.email)}, physicalAddress = ${escapeString(req.body.physicalAddress)}, enableWol = ${req.body.enableWol}, enableGuacamole = ${req.body.enableGuacamole}, guacamoleHost = ${escapeString(req.body.guacamoleHost)};`; + const query = `UPDATE trigger_database.personalData SET firstName = ${escapeString(req.body.firstName)}, lastName = ${escapeString(req.body.lastName)}, email = ${escapeString(req.body.email)}, physicalAddress = ${escapeString(req.body.physicalAddress)}, enableWol = ${req.body.enableWol}, enableGuacamole = ${req.body.enableGuacamole}, guacamoleHost = ${escapeString(req.body.guacamoleHost)}, nickname = ${escapeString(req.body.nickname)}, defaultFont = ${escapeString(req.body.defaultFont)};`; conn .query(query)