Skip to content

Commit

Permalink
reverted ansi-regex update (not an ESmodule); minor sanitation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
suculent committed Apr 29, 2022
1 parent 7ed38dd commit faf4748
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.19.0

exclude:
global:
- spec/**
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-101-1292345:
Expand Down
2 changes: 1 addition & 1 deletion lib/router.auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ module.exports = function (app) {
req.session.cookie.maxAge = maxAge;
res.cookie("x-thx-core", maxAge, {
maxAge: maxAge,
httpOnly: false,
httpOnly: true,
secure: false,
domain: short_domain
});
Expand Down
9 changes: 6 additions & 3 deletions lib/router.deviceapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ module.exports = function (app) {

app.post("/device/addpush", function (req, res) {

if ((typeof (req.body) === "undefined")) {
if (!Util.isDefined(req.body)) {
return Util.responder(res, false, "no_body");
}

let body = req.body;
let push = req.body.push;
if (!Util.isDefined(push)) {
return Util.responder(res, false, "no_data");
}

let token = sanitka.pushToken(body.push);
let token = sanitka.pushToken(push);
if (token === null) return Util.responder(res, false, "no_token");

let api_key = sanitka.apiKey(req.headers.authentication);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"overrides": {
"async": "2.6.4",
"json-schema": "0.4.0",
"ansi-regex": "6.0.1",
"ansi-regex": "5.0.1",
"jsprim": "1.4.2",
"string-width": "4.2.3",
"strip-ansi": "6.0.1",
Expand Down

0 comments on commit faf4748

Please sign in to comment.