Skip to content

Commit

Permalink
Fix possible security issue in inetChecksite()
Browse files Browse the repository at this point in the history
  • Loading branch information
EffectRenan committed Feb 18, 2021
1 parent 078ea40 commit e64cb03
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/poc.js
@@ -0,0 +1,22 @@
let si = require('./internet');
si.inetChecksite([]).then((a) => {
if (a.ok == false)
console.log("inetChecksite is fixed!")
else
console.log("inetChecksite is not fixed!")
});


si.inetLatency([]).then((a) => {
if (a == null)
console.log("inetLatency is fixed!")
else
console.log("inetLatency is not fixed!")
});
si = require('./processes');
si.services([]).then((a) => {
if (typeof a == typeof [])
console.log("services is fixed!")
else
console.log("services is not fixed!")
});
1 change: 1 addition & 0 deletions lib/util.js
Expand Up @@ -529,6 +529,7 @@ function sanitizeShellString(str, strict = false) {
s[i] === '\'' ||
s[i] === '`' ||
s[i] === '"' ||
strict && s[i] === '@' ||
strict && s[i] === ' ' ||
strict && s[i] == '{' ||
strict && s[i] == ')')) {
Expand Down

0 comments on commit e64cb03

Please sign in to comment.