Skip to content

Commit

Permalink
prevent arbitrary command execution.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreybutler committed Sep 19, 2021
1 parent 00f6bc8 commit a379d31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ module.exports = {
if (!pid){
throw new Error('PID is required for the kill operation.');
}

if (typeof isNaN(pid)) {
throw new Error('PID must be a number.')
}

callback = callback || function(){};
if (typeof force == 'function'){
callback = force;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-windows",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "Support for Windows services, event logging, UAC, and several helper methods for interacting with the OS.",
"keywords": [
"ngn",
Expand Down

1 comment on commit a379d31

@JamieSlome
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please # to comment.